From 48793c80dc4607fb1f75406df496b344e3d0b597 Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Wed, 17 Jul 2019 09:23:02 -0700 Subject: [PATCH 1/2] [Relay][VM]Fix debug statement --- src/relay/backend/vm/compiler.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/relay/backend/vm/compiler.cc b/src/relay/backend/vm/compiler.cc index 2b53d97baf8d..99fabee076bf 100644 --- a/src/relay/backend/vm/compiler.cc +++ b/src/relay/backend/vm/compiler.cc @@ -739,11 +739,11 @@ class VMCompiler : public runtime::ModuleNode { vm_->functions[func_index] = vm_func; } -#ifdef USE_RELAY_DEBUG - for (auto vm_func : vm.functions) { - std::cout << "Function: " << vm_func.name << std::endl - << vm_func << "-------------" << std::endl; - } +#if USE_RELAY_DEBUG + for (auto vm_func : vm_->functions) { + std::cout << "Function: " << vm_func.name << std::endl + << vm_func << "-------------" << std::endl; + } #endif // USE_RELAY_DEBUG PopulatePackedFuncMap(); From 620727ff75a560f10616db3ece41387179818bea Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Wed, 17 Jul 2019 11:13:18 -0700 Subject: [PATCH 2/2] Change debug statement --- src/relay/backend/vm/compiler.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/relay/backend/vm/compiler.cc b/src/relay/backend/vm/compiler.cc index 99fabee076bf..11a3d0403067 100644 --- a/src/relay/backend/vm/compiler.cc +++ b/src/relay/backend/vm/compiler.cc @@ -741,8 +741,7 @@ class VMCompiler : public runtime::ModuleNode { #if USE_RELAY_DEBUG for (auto vm_func : vm_->functions) { - std::cout << "Function: " << vm_func.name << std::endl - << vm_func << "-------------" << std::endl; + DLOG(INFO) << vm_func << "-------------"; } #endif // USE_RELAY_DEBUG