mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[TensorExpr] Block Codegen (#40054)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/40054 Reviewed By: ZolotukhinM Differential Revision: D22061350 Pulled By: protonu fbshipit-source-id: 004f7c316629b16610ecdbb97e43036c72c65067
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9063bcee04
commit
58a7e73a95
@ -554,6 +554,18 @@ void initJITBindings(PyObject* module) {
|
||||
.def("_jit_texpr_fuser_enabled", &tensorExprFuserEnabled)
|
||||
.def("_jit_texpr_fallback_allowed", &tensorexpr::fallbackAllowed)
|
||||
.def("_jit_texpr_set_fallback_allowed", &tensorexpr::setFallbackAllowed)
|
||||
.def(
|
||||
"_jit_set_te_generate_block_code",
|
||||
[](bool gen_block_code) {
|
||||
using namespace torch::jit::tensorexpr;
|
||||
return getTEGenerateBlockCode() = gen_block_code;
|
||||
})
|
||||
.def(
|
||||
"_jit_get_te_generate_block_code",
|
||||
[]() -> bool {
|
||||
using namespace torch::jit::tensorexpr;
|
||||
return getTEGenerateBlockCode();
|
||||
})
|
||||
.def(
|
||||
"_jit_pass_fuse_tensorexprs",
|
||||
[](std::shared_ptr<Graph>& g) { return FuseTensorExprs(g); })
|
||||
|
Reference in New Issue
Block a user