Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
[TensorExpr] Move 'compute*' functions to operators/... (pytorch#65552)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#65552

This PR is mostly a verbatim move of several functions to different
files. The goal is to have more consistency in what resides where.

With this PR:
* All `compute*` functions defining how a given operator needs to be
lowered to TE IR will reside in `operators/*.{cpp,h}`.
* Auxiliary functions for these functions will reside in
`operators/misc.cpp`. `compute*` functions for ops not belonging
anywhere else can also go to that file.
* `operators/unary.*` is renamed to `operators/pointwise.*` and now
includes functions like `computeTwoOperands`.
* `kernel.*` now contains *only JIT-related* logic and implementations of
`TensorExprKernel` methods.

Test Plan: Imported from OSS

Reviewed By: navahgar

Differential Revision: D31148923

Pulled By: ZolotukhinM

fbshipit-source-id: e36ad8e779b8d30a33b49ea4ebf6d6a7438989f4
  • Loading branch information
Mikhail Zolotukhin authored and facebook-github-bot committed Oct 1, 2021
1 parent 3a0165d commit 015e007
Show file tree
Hide file tree
Showing 14 changed files with 1,175 additions and 1,021 deletions.
3 changes: 2 additions & 1 deletion tools/build_variables.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,11 @@ core_sources_full_mobile_no_backend_interface = [
"torch/csrc/jit/tensorexpr/mem_dependency_checker.cpp",
"torch/csrc/jit/tensorexpr/operators/conv2d.cpp",
"torch/csrc/jit/tensorexpr/operators/matmul.cpp",
"torch/csrc/jit/tensorexpr/operators/misc.cpp",
"torch/csrc/jit/tensorexpr/operators/norm.cpp",
"torch/csrc/jit/tensorexpr/operators/pointwise.cpp",
"torch/csrc/jit/tensorexpr/operators/reduction.cpp",
"torch/csrc/jit/tensorexpr/operators/softmax.cpp",
"torch/csrc/jit/tensorexpr/operators/unary.cpp",
"torch/csrc/jit/tensorexpr/reduction.cpp",
"torch/csrc/jit/tensorexpr/registerizer.cpp",
"torch/csrc/jit/tensorexpr/tensor.cpp",
Expand Down
Loading

0 comments on commit 015e007

Please sign in to comment.