Skip to content

Add missing in-place tensor operations#1529

Open
alinpahontu2912 wants to merge 1 commit intodotnet:mainfrom
alinpahontu2912:add_new_apis
Open

Add missing in-place tensor operations#1529
alinpahontu2912 wants to merge 1 commit intodotnet:mainfrom
alinpahontu2912:add_new_apis

Conversation

@alinpahontu2912
Copy link
Member

Add in-place variants for existing PyTorch tensor APIs:

  • logit_ (fixed native to use CATCH instead of CATCH_TENSOR)
  • copysign_, heaviside_, nextafter_
  • deg2rad_, rad2deg_, exp2_, float_power_
  • nan_to_num_

Also add torch.heaviside/torch.heaviside_ static wrappers.

Changes span all 4 layers: native C++ (THSTensor.h/.cpp), PInvoke (LibTorchSharp.THSTensor.cs), managed wrappers (Tensor.cs, Tensor.Math.cs), and static torch.* methods (torch.PointwiseOps.cs).

Add in-place variants for existing PyTorch tensor APIs:
- logit_ (fixed native to use CATCH instead of CATCH_TENSOR)
- copysign_, heaviside_, nextafter_
- deg2rad_, rad2deg_, exp2_, float_power_
- nan_to_num_

Also add torch.heaviside/torch.heaviside_ static wrappers.

Changes span all 4 layers: native C++ (THSTensor.h/.cpp),
PInvoke (LibTorchSharp.THSTensor.cs), managed wrappers
(Tensor.cs, Tensor.Math.cs), and static torch.* methods
(torch.PointwiseOps.cs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant