-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- cauchy_ - geometric - binomial - binomial.out - _dirichlet_grad - _dirichlet_grad.out - _sample_dirichlet - _sample_dirichlet.out --------- Co-authored-by: Yutao Xu <[email protected]>
- Loading branch information
Showing
12 changed files
with
1,223 additions
and
4 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
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
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,17 @@ | ||
#include <ATen/native/TensorIterator.h> | ||
#include <ATen/native/xpu/sycl/DistributionTemplates.h> | ||
#include <ATen/xpu/XPUGeneratorImpl.h> | ||
|
||
namespace at::native::xpu { | ||
|
||
void cauchy_kernel( | ||
TensorIteratorBase& iter, | ||
double median, | ||
double sigma, | ||
c10::optional<Generator> gen) { | ||
auto generator = get_generator_or_default<at::XPUGeneratorImpl>( | ||
gen, at::xpu::detail::getDefaultXPUGenerator()); | ||
at::native::templates::xpu::cauchy_kernel(iter, median, sigma, generator); | ||
} | ||
|
||
} // namespace at::native::xpu |
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,16 @@ | ||
#include <ATen/native/TensorIterator.h> | ||
#include <ATen/native/xpu/sycl/DistributionTemplates.h> | ||
#include <ATen/xpu/XPUGeneratorImpl.h> | ||
|
||
namespace at::native::xpu { | ||
|
||
void geometric_kernel( | ||
TensorIteratorBase& iter, | ||
double p_, | ||
c10::optional<Generator> gen) { | ||
auto generator = get_generator_or_default<at::XPUGeneratorImpl>( | ||
gen, at::xpu::detail::getDefaultXPUGenerator()); | ||
at::native::templates::xpu::geometric_kernel(iter, p_, generator); | ||
} | ||
|
||
} // namespace at::native::xpu |
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
Oops, something went wrong.