Skip to content

Commit

Permalink
XLA downcast for S64 and U64 for Neuron (#8347)
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-nm9 authored Nov 7, 2024
1 parent 6454b42 commit 03f07e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions torch_xla/csrc/dtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,11 @@ xla::PrimitiveType MaybeDowncastToXlaDeviceType(
return CheckNeuronDevice(hw_type) ? xla::PrimitiveType::S32
: xla::PrimitiveType::S16;
case xla::PrimitiveType::S64:
return xla::PrimitiveType::S64;
return CheckNeuronDevice(hw_type) ? xla::PrimitiveType::S32
: xla::PrimitiveType::S64;
case xla::PrimitiveType::U64:
return xla::PrimitiveType::U64;
return CheckNeuronDevice(hw_type) ? xla::PrimitiveType::U32
: xla::PrimitiveType::U64;
case xla::PrimitiveType::C128:
return xla::PrimitiveType::C128;
default:
Expand Down

0 comments on commit 03f07e2

Please sign in to comment.