Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CODEGEN NVPTX] Initialize llvm before lookup for the target #2683

Merged
merged 1 commit into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/tvm/contrib/nvcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def find_libdevice_path(arch):
selected_ver = 0
selected_path = None
cuda_ver = get_cuda_version(cuda_path)
if cuda_ver in (9.0, 9.1):
if cuda_ver in (9.0, 9.1, 10.0):
path = os.path.join(lib_path, "libdevice.10.bc")
else:
for fn in os.listdir(lib_path):
Expand Down
1 change: 1 addition & 0 deletions src/codegen/llvm/codegen_amdgpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ inline int DetectROCMComputeVersion(const std::string& target) {
}

runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
InitializeLLVM();
CHECK(target.length() >= 4 &&
target.substr(0, 4) == "rocm");
std::ostringstream config;
Expand Down
1 change: 1 addition & 0 deletions src/codegen/llvm/codegen_nvptx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ inline int DetectCUDAComputeVersion() {
}

runtime::Module BuildNVPTX(Array<LoweredFunc> funcs, std::string target) {
InitializeLLVM();
CHECK(target.length() >= 5 &&
target.substr(0, 5) == "nvptx");
int compute_ver = DetectCUDAComputeVersion();
Expand Down