Skip to content

Commit

Permalink
use IsGPUTask function
Browse files Browse the repository at this point in the history
  • Loading branch information
Masahiro Masuda committed Dec 5, 2020
1 parent c89fcd2 commit b2532d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/auto_scheduler/feature.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <unordered_map>
#include <vector>

#include "search_policy/utils.h"
#include "utils.h"

namespace tvm {
Expand Down Expand Up @@ -1296,8 +1297,7 @@ void GetPerStoreFeaturesWorkerFunc(const SearchTask& task, const State& state, i
}
auto mod = IRModule(Map<GlobalVar, BaseFunc>({{global_var, f}}));

auto device_type = task->target->kind->device_type;
if (device_type == kDLGPU || device_type == kDLROCM) {
if (IsGPUTask(task)) {
auto pass_list = Array<tvm::transform::Pass>();
// Phase 0
pass_list.push_back(tir::transform::InjectPrefetch());
Expand Down

0 comments on commit b2532d3

Please sign in to comment.