Skip to content

Commit

Permalink
Bugfix: Set return type of torch_tensor_get_sizes to be long long int*.
Browse files Browse the repository at this point in the history
  • Loading branch information
jatkinson1000 committed Oct 22, 2024
1 parent 8121ec6 commit 5515f9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ctorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int torch_tensor_get_rank(const torch_tensor_t tensor)
return t->sizes().size();
}

const long int* torch_tensor_get_sizes(const torch_tensor_t tensor)
const long long int* torch_tensor_get_sizes(const torch_tensor_t tensor)
{
auto t = reinterpret_cast<torch::Tensor*>(tensor);
return t->sizes().data();
Expand Down
2 changes: 1 addition & 1 deletion src/ctorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ EXPORT_C int torch_tensor_get_rank(const torch_tensor_t tensor);
* @param Torch Tensor to determine the rank of
* @return pointer to the sizes array of the Torch Tensor
*/
EXPORT_C const long int* torch_tensor_get_sizes(const torch_tensor_t tensor);
EXPORT_C const long long int* torch_tensor_get_sizes(const torch_tensor_t tensor);

/**
* Function to delete a Torch Tensor to clean up
Expand Down

0 comments on commit 5515f9e

Please sign in to comment.