1
- #include < torch/extension.h>
1
+ #include < ATen/Operators.h>
2
+ #include < torch/all.h>
3
+ #include < torch/library.h>
2
4
3
5
#include < cuda.h>
4
6
#include < cuda_runtime.h>
@@ -18,7 +20,7 @@ at::Tensor mymuladd_cuda(const at::Tensor& a, const at::Tensor& b, double c) {
18
20
TORCH_INTERNAL_ASSERT (b.device ().type () == at::DeviceType::CUDA);
19
21
at::Tensor a_contig = a.contiguous ();
20
22
at::Tensor b_contig = b.contiguous ();
21
- at::Tensor result = torch ::empty (a_contig.sizes (), a_contig.options ());
23
+ at::Tensor result = at ::empty (a_contig.sizes (), a_contig.options ());
22
24
const float * a_ptr = a_contig.data_ptr <float >();
23
25
const float * b_ptr = b_contig.data_ptr <float >();
24
26
float * result_ptr = result.data_ptr <float >();
@@ -41,7 +43,7 @@ at::Tensor mymul_cuda(const at::Tensor& a, const at::Tensor& b) {
41
43
TORCH_INTERNAL_ASSERT (b.device ().type () == at::DeviceType::CUDA);
42
44
at::Tensor a_contig = a.contiguous ();
43
45
at::Tensor b_contig = b.contiguous ();
44
- at::Tensor result = torch ::empty (a_contig.sizes (), a_contig.options ());
46
+ at::Tensor result = at ::empty (a_contig.sizes (), a_contig.options ());
45
47
const float * a_ptr = a_contig.data_ptr <float >();
46
48
const float * b_ptr = b_contig.data_ptr <float >();
47
49
float * result_ptr = result.data_ptr <float >();
0 commit comments