Commit 94b309a1 by Liang ZOU Committed by Tianqi Chen

add c backend to CreateTarget (#2256)

parent 50cfd3cd
...@@ -58,7 +58,7 @@ Target CreateTarget(const std::string& target_name, ...@@ -58,7 +58,7 @@ Target CreateTarget(const std::string& target_name,
} }
t->device_type = kDLCPU; t->device_type = kDLCPU;
t->thread_warp_size = 1; t->thread_warp_size = 1;
if (target_name == "llvm") { if (target_name == "c" || target_name == "llvm") {
t->keys_array.push_back(ir::StringImm::make("cpu")); t->keys_array.push_back(ir::StringImm::make("cpu"));
} else if (target_name == "cuda" || target_name == "nvptx") { } else if (target_name == "cuda" || target_name == "nvptx") {
t->device_type = kDLGPU; t->device_type = kDLGPU;
......
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