Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing type uint16, uint32, and uint64 to TensorHash in LTC. #125972

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions torch/csrc/lazy/core/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ static inline hash_t TensorHash(const at::Tensor& tensor) {
return DataHash(ctensor.const_data_ptr<c10::complex<float>>(), size);
case at::ScalarType::ComplexDouble:
return DataHash(ctensor.const_data_ptr<c10::complex<double>>(), size);
case at::ScalarType::UInt16:
return DataHash(ctensor.const_data_ptr<uint16_t>(), size);
case at::ScalarType::UInt32:
return DataHash(ctensor.const_data_ptr<uint32_t>(), size);
case at::ScalarType::UInt64:
return DataHash(ctensor.const_data_ptr<uint64_t>(), size);
default:
TORCH_INTERNAL_ASSERT(
false, "Unsupported scalar type:", ctensor.scalar_type());
Expand Down