Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ater operator #93

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ater/ops/ater_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"srcs": [
f"{ATER_CSRC_DIR}/pybind/ater_operator_pybind.cu",
f"{ATER_CSRC_DIR}/include/ater_operator.h.cu",
f"{ATER_CSRC_DIR}/kernels/ater_operator.cu",
f"{ATER_CSRC_DIR}/kernels/binary_operator.cu",
],
"md_name": MD_NAME,
}
Expand All @@ -29,3 +29,9 @@ def ater_mul(input: Tensor, other: Tensor) -> Tensor: ...

@compile_ops(**compile_ops_)
def ater_div(input: Tensor, other: Tensor) -> Tensor: ...

@compile_ops(**compile_ops_)
def ater_sigmoid(input: Tensor) -> Tensor: ...

@compile_ops(**compile_ops_)
def ater_tanh(input: Tensor) -> Tensor: ...
4 changes: 3 additions & 1 deletion csrc/include/ater_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
torch::Tensor ater_add(torch::Tensor &input0, torch::Tensor &input1);
torch::Tensor ater_mul(torch::Tensor &input0, torch::Tensor &input1);
torch::Tensor ater_sub(torch::Tensor &input0, torch::Tensor &input1);
torch::Tensor ater_div(torch::Tensor &input0, torch::Tensor &input1);
torch::Tensor ater_div(torch::Tensor &input0, torch::Tensor &input1);
torch::Tensor ater_sigmoid(torch::Tensor &input);
torch::Tensor ater_tanh(torch::Tensor &input);
Loading