Skip to content

Replace swich case with refCastFrom()

Olivier BICHLER requested to merge better_inputs_to_attr into dev

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 the allowDataDependency 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