Skip to content

Commit

Permalink
Support Int32 datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
jnie-TT authored and jserbedzijaTT committed Mar 1, 2025
1 parent 5fbaf8d commit ace4ece
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tt_torch/csrc/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ static tt::target::DataType torch_scalar_type_to_dt(torch::ScalarType st) {
return tt::target::DataType::UInt8;
case torch::ScalarType::Short:
return tt::target::DataType::UInt16;
case torch::ScalarType::Int:
case torch::ScalarType::UInt32:
return tt::target::DataType::UInt32;
case torch::ScalarType::Int:
return tt::target::DataType::Int32;
case torch::ScalarType::Long:
return tt::target::DataType::UInt32;
case torch::ScalarType::Half:
Expand Down Expand Up @@ -54,6 +56,8 @@ static torch::ScalarType dt_to_torch_scalar_type(tt::target::DataType df) {
case tt::target::DataType::UInt16:
return torch::ScalarType::Short;
case tt::target::DataType::UInt32:
return torch::ScalarType::UInt32;
case tt::target::DataType::Int32:
return torch::ScalarType::Int;
case tt::target::DataType::Float16:
return torch::ScalarType::Half;
Expand Down

0 comments on commit ace4ece

Please sign in to comment.