Open OlivierDehaene opened 11 months ago
We do typecast int64 tensors to int32. This happens in the compiler where it treats int64 datatypes as int32 by truncating the high-order bits (https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/compiler/neuronx-cc/index.html?highlight=int64#known-issues). This is because the hardware doesn't support int64 data-types natively.
I see. Maybe a warning during compilation could be added?
This still feels like a bug as a user of the SDK.
Having dtype int32 + [1x64] is error prone and does not provide the info back to the neff user than the tensor is not a "true" int32 but a int64 camouflaged as int32.
The compiler saying that it casted to int32 while not really doing so (because the size is the same) is very weird.
Hello
There is a bug in
torch_neuronx.trace
:torch.int64
tensors are exported asNRT_DTYPE_INT32
with dim * 2 in the NEFF file (for example, a [2x512]torch.int64
tensor would be exported as a [2x1024]NRT_DTYPE_INT32
tensor).Here is an example:
test.py
:test.c
DType should be 10 and Shape should be 1x32.