Skip to content

[STABLE ABI] Porting rir/rir.cpp rir/ray_tracing.cpp #4076

@pearu

Description

@pearu

This issue collects tasks that block porting rir/rir.cpp and rir/ray_tracing.cpp to use torch stable ABI.

  • implement mutable_data_ptr<T>() and const_data_ptr<T>() in torch/csrc/stable/tensor_struct.h. For instance, this simplifies porting of expressions like tensor.data_ptr<scalar_t>(). Currently, one needs to rewrite this as reinterpret_cast<scalar_t*>(tensor.data_ptr()) where tensor is a torch::stable::Tensor. Not really a blocker but would be nice to have.
    Fix available: [STABLE ABI] Add mutable_data_ptr() and const_data_ptr() methods to torch::stable::Tensor. pytorch#161891
  • import arange as a stable/ops.h factory function
  • implement torch::fft::fftshift and torch::fft::irfft as a stable/ops.h operation
    Resolution: delete rir/ray_tracing.cpp as unused
  • implement index as a torch::stable::Tensor method. Can we use torch::indexing::Slice() in torch stable ABI code?
  • expose AT_DISPATCH_FLOATING_TYPES_AND_HALF and AT_DISPATCH_FLOATING_TYPES to stable ABI. Not really a blocker but would be nice to have.
    For a workaround, see [STABLE ABI] Porting forced_align #4078
  • implement zeros and full as a stable/ops.h factory functions. Currently, one can use new_empty and fill_ to mimic these functions. Not really a blocker but would be nice to have.
  • implement tensor as a stable/ops.h factory function. Currently, one can use new_empty but it is really clumsy to mimic tensor, especially for CUDA tensors.
  • implement dot, norm, and max as a torch::stable::Tensor method or a stable/ops.h operation
  • implement item<T>() as a torch::stable::Tensor template method
    For a workaround, see [STABLE ABI] Porting forced_align #4078

^ @NicolasHug @scotts @janeyx99

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions