-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
actionablemodule: unsigned intRelated to the new uint16, uint32, uint64 typesRelated to the new uint16, uint32, uint64 typestriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Describe the bug
There is a float tensor in my progarm. When I first convert it to uint16 and then flip, the progarm crashes. I'm not sure whether this is a bug. Here is a minimum example:
#include <torch/torch.h>
int main()
{
int Size = 4;
auto T = torch::randn({ Size,Size,1 }, torch::dtype(torch::kFloat).device(torch::kCUDA));
std::cout << T.flip(0) << std::endl; //No problem
std::cout << T.to(torch::kInt16).flip(0) << std::endl; //No problem
std::cout << T.flip(0).to(torch::kUInt16) << std::endl; //No problem
std::cout << T.to(torch::kUInt16).flip(0) << std::endl; //Crash
return 0;
}
Versions
Libtorch 2.3.1 with CUDA 11.8
Metadata
Metadata
Assignees
Labels
actionablemodule: unsigned intRelated to the new uint16, uint32, uint64 typesRelated to the new uint16, uint32, uint64 typestriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module