-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
#include <xpu/ATen/ops/_convert_indices_from_coo_to_csr_native.h> | ||
#include <ATen/native/sparse/xpu/sycl/SparseCsrTensorMathKernels.h> | ||
|
||
namespace at::native{ | ||
|
||
TORCH_IMPL_FUNC(_convert_indices_from_coo_to_csr_structured_xpu)( | ||
const Tensor& input, | ||
const int64_t size, | ||
const bool out_int32, | ||
const Tensor& result){ | ||
xpu::convert_indices_from_coo_to_csr_structured_kernel( | ||
input, | ||
size, | ||
out_int32, | ||
result); | ||
}; | ||
|
||
} // namespace at::native |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/ATen/native/sparse/xpu/sycl/SparseCsrTensorMathKernels.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <ATen/native/SparseTensorUtils.h> | ||
#include <ATen/native/TensorIterator.h> | ||
|
||
namespace at::native::xpu { | ||
|
||
TORCH_XPU_API void convert_indices_from_coo_to_csr_structured_kernel( | ||
const Tensor& input, | ||
const int64_t size, | ||
const bool out_int32, | ||
const Tensor& result); | ||
|
||
} // namespace at::native::xpu |