@@ -72,7 +72,7 @@ Tensor NestedTensor_add_Tensor(
72
72
}
73
73
at::Tensor numbers_t = torch::tensor (numbers).to (torch::kInt32 );
74
74
Tensor nt_sizes_cumsum =
75
- at::native:: cumsum (numbers_t , 0 ).to (torch::kInt32 ).reshape ({-1 });
75
+ at::cumsum (numbers_t , 0 ).to (torch::kInt32 ).reshape ({-1 });
76
76
TORCH_CHECK (nt_sizes_.dim () == 2 , " NestedTensor metadata of unexpected dimension." )
77
77
Tensor nt_sizes = at::cat ({torch::tensor ({0 }, torch::kInt32 ), nt_sizes_cumsum});
78
78
nt_sizes = nt_sizes.to (torch::kCUDA );
@@ -108,7 +108,7 @@ Tensor NestedTensor_add_Tensor(
108
108
}
109
109
std::tie (self, other) = _expand_other_as (self_, other_);
110
110
return map_nested_tensor (
111
- [&alpha](Tensor s, Tensor o) {
111
+ [&alpha](Tensor s, Tensor o) {
112
112
return at::add (s, o, alpha); },
113
113
self,
114
114
other);
@@ -270,7 +270,7 @@ Tensor NestedTensor_mul_Tensor(const Tensor& self_, const Tensor& other_) {
270
270
}
271
271
at::Tensor numbers_t = torch::tensor (numbers).to (torch::kInt32 );
272
272
Tensor nt_sizes_cumsum =
273
- at::native:: cumsum (numbers_t , 0 ).to (torch::kInt32 ).reshape ({-1 });
273
+ at::cumsum (numbers_t , 0 ).to (torch::kInt32 ).reshape ({-1 });
274
274
TORCH_CHECK (nt_sizes_.dim () == 2 , " NestedTensor metadata of unexpected dimension." )
275
275
Tensor nt_sizes = at::cat ({torch::tensor ({0 }, torch::kInt32 ), nt_sizes_cumsum});
276
276
nt_sizes = nt_sizes.to (torch::kCUDA );
@@ -295,7 +295,7 @@ Tensor NestedTensor_mul_Tensor(const Tensor& self_, const Tensor& other_) {
295
295
}
296
296
std::tie (self, other) = _expand_other_as (self_, other_);
297
297
return map_nested_tensor (
298
- [](Tensor s, Tensor o) {
298
+ [](Tensor s, Tensor o) {
299
299
return at::mul (s, o); }, self, other);
300
300
}
301
301
@@ -389,7 +389,7 @@ Tensor NestedTensor_sub_Tensor(
389
389
}
390
390
at::Tensor numbers_t = torch::tensor (numbers).to (torch::kInt32 );
391
391
Tensor nt_sizes_cumsum =
392
- at::native:: cumsum (numbers_t , 0 ).to (torch::kInt32 ).reshape ({-1 });
392
+ at::cumsum (numbers_t , 0 ).to (torch::kInt32 ).reshape ({-1 });
393
393
TORCH_CHECK (nt_sizes_.dim () == 2 , " NestedTensor metadata of unexpected dimension." )
394
394
Tensor nt_sizes = at::cat ({torch::tensor ({0 }, torch::kInt32 ), nt_sizes_cumsum});
395
395
nt_sizes = nt_sizes.to (torch::kCUDA );
@@ -414,7 +414,7 @@ Tensor NestedTensor_sub_Tensor(
414
414
}
415
415
std::tie (self, other) = _expand_other_as (self_, other_);
416
416
return map_nested_tensor (
417
- [&alpha](Tensor s, Tensor o) {
417
+ [&alpha](Tensor s, Tensor o) {
418
418
return at::sub (s, o, alpha); },
419
419
self,
420
420
other);
0 commit comments