- Notifications
You must be signed in to change notification settings - Fork 732
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 and ScalarTypeToCPPTypeT to headeronly pytorch#164350 and Refactor AT_DISPATCH_CASE_... macros to headeronly pytorch#165695 -
mutable/const_data_ptrmethods 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) -
tofunction (to cuda, to cpu, as an alternative tocpuandcudafunctions below) -
cpufunction, prototype available in [STABLE ABI] Port forced_align #4079 (see ops.h), moved to upstream, see [STABLE ABI] Add cpu operation. pytorch#161911 -
cudafunction, 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 -
clonefunction, done in [STABLE ABI] Add copy_ operation. pytorch#161895 -
indexfunction, requiresSlice, workaround using other aten methods -
new_zerosfunction, prototype available in [STABLE ABI] Port forced_align #4079 (see ops.h) -
new_emptywith 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 -
tensorfunction -
maxfunction -
selectfunction -
unsqueezefunction -
squeezefunction
-
Metadata
Metadata
Assignees
Labels
No labels