tqchen commented on a change in pull request #5690:
URL: https://github.com/apache/incubator-tvm/pull/5690#discussion_r432541406
##########
File path: tests/cpp/relay_transform_sequential.cc
##########
@@ -70,7 +70,7 @@ TEST(Relay, Sequential) {
auto mod = IRModule::FromExpr(func);
auto pass_ctx = relay::transform::PassContext::Create();
pass_ctx->opt_level = 3;
- pass_ctx->fallback_device = 1;
+ pass_ctx->config.Set("relay.fallback_device_type", IntImm(DataType::Int(32),
1));
Review comment:
After merging the code, I find that we can further simplify it to
pass_ctx->config.Set("relay.fallback_device_type", Integer(1));
##########
File path: src/relay/backend/build_module.cc
##########
@@ -304,7 +304,12 @@ class RelayBuildModule : public runtime::ModuleNode {
// Handle heterogeneous compilation.
transform::PassContext pass_ctx = PassContext::Current();
if (targets_.size() > 1) {
- relay_module = RunDeviceAnnotationPass(relay_module,
pass_ctx->fallback_device);
+ Optional<IntImm> opt_fallback_dev =
+ pass_ctx->GetConfig("relay.fallback_device_type",
+ IntImm(runtime::DataType::Int(32),
static_cast<int>(kDLCPU)));
Review comment:
Integer(kDLCPU)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]