forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathairy_ai.cpp
More file actions
24 lines (19 loc) · 738 Bytes
/
airy_ai.cpp
File metadata and controls
24 lines (19 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#define TORCH_ASSERT_NO_OPERATORS
#include <ATen/native/UnaryOps.h>
#include <ATen/Dispatch.h>
#include <ATen/native/Math.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/cpu/Loops.h>
namespace at::native {
inline namespace CPU_CAPABILITY {
static void airy_ai_kernel(TensorIteratorBase& iterator) {
TORCH_INTERNAL_ASSERT(iterator.ntensors() == 2);
AT_DISPATCH_FLOATING_TYPES(iterator.common_dtype(), "airy_ai_cpu", [&]() {
cpu_kernel(iterator, [](scalar_t x) {
return airy_ai_forward(x);
});
});
} // airy_ai_kernel(TensorIteratorBase& iterator)
} // namespace CPU_CAPABILITY
REGISTER_DISPATCH(special_airy_ai_stub, &CPU_CAPABILITY::airy_ai_kernel);
} // namespace at::native