-
Notifications
You must be signed in to change notification settings - Fork 730
Open
Description
This is a tracking issue for porting torchaudio extension modules to use torch stable ABI.
Must have:
-
AT_DISPATCH_FLOATING_TYPES_AND_HALF
,AT_DISPATCH_FLOATING_TYPES
. Prototypes of these macros are implemented in [STABLE ABI] Port forced_align #4079 (see dispatch.h) and moved to upstream, see [STABLE ABI] Add STABLE_DISPATCH_... CPP macros pytorch#163973. The plan is to move these macros to headeronly, see ghstack starting from Move AT_FORALL_... macros to headeronly pytorch#164350 -
mutable/const_data_ptr
methods and templates. Prototypes are implemented in [STABLE ABI] Port forced_align #4079 (see ops.h) and moved to upstream, see [STABLE ABI] Add mutable_data_ptr() and const_data_ptr() methods to torch::stable::Tensor. pytorch#161891- Why we need this: dependency of accessors
- tensor accessors for both CPU and CUDA. Prototypes of these templates are implemented in [STABLE ABI] Port forced_align #4079 (see TensorAccessor.h) and moved to upstream, see [STABLE ABI] Add tensor accessors. pytorch#164123, landing requires ArrayRef
- Why we need this: The codebase currently relies on accessors with up to 3 dimensions. We technically could work around this by relying on raw pointers and enforcing contiguity, but that would obfuscate what would otherwise be simple indexing calls.
-
parallel_for
, in-progress by torch stable ABI team: Add stable parallel_for pytorch#161320- Alternative is to not use
parallel_for
, for decreased performance. Acceptable, but not ideal.
- Alternative is to not use
Nice to have:
We think we can reasonably work around these without incurring too much debt in TorchAudio, so we can treat them as nice-to-have for now.
- Tensor operations as stable ABI operations:
-
item<T>()
template, prototype available in [STABLE ABI] Port forced_align #4079 (see ops.h) -
to
function (to cuda, to cpu, as an alternative tocpu
andcuda
functions below) -
cpu
function, prototype available in [STABLE ABI] Port forced_align #4079 (see ops.h), moved to upstream, see [STABLE ABI] Add cpu operation. pytorch#161911 -
cuda
function, prototype available in [STABLE ABI] Port forced_align #4079 (see ops.h) -
copy_
function, done in [STABLE ABI] Add clone method to torch::stable::Tensor pytorch#161896 -
clone
function, done in [STABLE ABI] Add copy_ operation. pytorch#161895 -
index
function, requiresSlice
, workaround using other aten methods -
new_zeros
function, prototype available in [STABLE ABI] Port forced_align #4079 (see ops.h) -
new_empty
with device support, prototypes in [STABLE ABI] Port forced_align #4079 and [STABLE ABI] Add device_type and device_index optional arguments to new_empty. pytorch#161894 -
tensor
function -
max
function -
select
function -
unsqueeze
function -
squeeze
function
-
Metadata
Metadata
Assignees
Labels
No labels