Skip to content

Commit 79cbdb6

Browse files
authored
Companion PR for 'SymIntify _copy functionalization kernels (and _copy_out too)' (#4164)
* Companion PR for 'SymIntify _copy functionalization kernels (and _copy_out too)' Upstream at pytorch/pytorch#88572 Signed-off-by: Edward Z. Yang <[email protected]> * fix lint Signed-off-by: Edward Z. Yang <[email protected]> * Delete .torch_pin Signed-off-by: Edward Z. Yang <[email protected]>
1 parent 515d53e commit 79cbdb6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

torch_xla/csrc/aten_xla_type.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,9 +3067,11 @@ at::Tensor XLANativeFunctions::new_empty_strided_symint(
30673067
device, pin_memory);
30683068
}
30693069

3070-
at::Tensor XLANativeFunctions::narrow_copy(const at::Tensor& self, int64_t dim,
3071-
int64_t start, int64_t length) {
3072-
return at::native::narrow_copy_dense(self, dim, start, length);
3070+
at::Tensor XLANativeFunctions::narrow_copy_symint(const at::Tensor& self,
3071+
int64_t dim,
3072+
c10::SymInt start,
3073+
c10::SymInt length) {
3074+
return at::native::narrow_copy_dense_symint(self, dim, start, length);
30733075
}
30743076
at::Tensor XLANativeFunctions::pixel_shuffle(const at::Tensor& self,
30753077
int64_t upscale_factor) {

xla_native_functions.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ symint:
355355
- new_empty_strided
356356
- view
357357
- diagonal_backward
358+
- narrow_copy
358359
autograd:
359360
- einsum
360361
- max_pool2d

0 commit comments

Comments
 (0)