Replace swich case with refCastFrom()
Much better inputs handling for the Slice, Gather and Reshape operators.
Current implementation will fail in each of these cases:
- Use of any other data type than float, double, int64 or int32 for the inputs;
- Inputs from another backend => operators not usable of GPU!
Also:
- The
forwardDims()
mechanism with theallowDataDependency
argument was no used as intended. Output should never be resized in the Operator implementation. Actually, no memory allocation should be performed here. All dims must be known and allocated for the implementation; - There was a huge bug in Tensor registration for Int64: type
long
was used, which is not garanteed to be 64-bits (it is not on MSVC!)
Please read carefully the changes to understand the intended way to handle output dims data dependent operators.
Edited by Olivier BICHLER
Merge request reports
Activity
Filter activity
requested review from @pineapple and @hrouis
assigned to @olivierbichler
added LanguageC++ PriorityMedium Refactoring🎨 labels
added StatusWork in Progress label
added 1 commit
- 929db722 - Fixed wrong type: long is not garanteed to be int64!
added 3 commits
-
929db722...95481066 - 2 commits from branch
dev
- 42db13e1 - Merge branch 'dev' into better_inputs_to_attr
-
929db722...95481066 - 2 commits from branch
added 3 commits
-
929db722...95481066 - 2 commits from branch
dev
- 42db13e1 - Merge branch 'dev' into better_inputs_to_attr
-
929db722...95481066 - 2 commits from branch
added 1 commit
- 697c8533 - Do not resize output in forward() as it is done in forwardDims()
Please register or sign in to reply