Commit 64e5681d by Wei Chen Committed by Tianqi Chen

[PASS]Treat Halide call_type as pure expression (#2404)

parent 129a1c18
Subproject commit a08e26e5a97f4ef4d566a42f6c78704b3f9c7b8a
Subproject commit 6e7c1f046fda536562dc80977e93324fee2324bd
#include <dmlc/logging.h>
#include <gtest/gtest.h>
#include <tvm/tvm.h>
#include <tvm/ir_pass.h>
TEST(SimplePasses, HasSideEffect) {
using namespace tvm;
auto n = var("n");
Array<Expr> shape;
shape.push_back(n);
auto A = placeholder(shape, Float(32), "A");
CHECK(!tvm::ir::HasSideEffect(A[0]));
}
int main(int argc, char ** argv) {
testing::InitGoogleTest(&argc, argv);
testing::FLAGS_gtest_death_test_style = "threadsafe";
return RUN_ALL_TESTS();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment