Skip to content

Commit

Permalink
Fixing compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuan14 committed Jul 8, 2024
1 parent 52193ab commit 8e60307
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ATen/native/xpu/sycl/PointwiseOpsKernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct AddcmulComplexFunctor {
return a + alpha_ * b * c;
}

AddcmulComplexFunctor(accscalar_t alpha) : alpha_(alpha) {}
AddcmulComplexFunctor(scalar_t alpha) : alpha_(alpha) {}

private:
scalar_t alpha_;
Expand All @@ -47,7 +47,7 @@ void addcmul_kernel(TensorIterator& iter, Scalar value) {
iter.dtype(),
"addcmul_xpu",
[&]() {
using accscalar_t = at::accscalar_type<scalar_t, true>;
using accscalar_t = at::acc_type<scalar_t, true>;
auto alpha = value.to<accscalar_t>();
gpu_kernel(iter, AddcmulFunctor<scalar_t>(alpha));
});
Expand Down Expand Up @@ -102,6 +102,7 @@ void addcdiv_kernel(TensorIterator& iter, Scalar value) {
}
}

template <typename scalar_t>
struct MSEBackwardFunctor {
scalar_t operator()(scalar_t a, scalar_t b, scalar_t c) const {
return alpha_ * (a - b) * c;
Expand Down

0 comments on commit 8e60307

Please sign in to comment.