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

Support Int32 datatype #384

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading