Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
2bf34581
Commit
2bf34581
authored
Feb 28, 2019
by
Denis Khalikov
Committed by
masahi
Feb 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CODEGEN LLVM GPU] Initialize llvm before lookup for the target (#2683)
parent
55c0243f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletions
+3
-1
python/tvm/contrib/nvcc.py
+1
-1
src/codegen/llvm/codegen_amdgpu.cc
+1
-0
src/codegen/llvm/codegen_nvptx.cc
+1
-0
No files found.
python/tvm/contrib/nvcc.py
View file @
2bf34581
...
@@ -151,7 +151,7 @@ def find_libdevice_path(arch):
...
@@ -151,7 +151,7 @@ def find_libdevice_path(arch):
selected_ver
=
0
selected_ver
=
0
selected_path
=
None
selected_path
=
None
cuda_ver
=
get_cuda_version
(
cuda_path
)
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"
)
path
=
os
.
path
.
join
(
lib_path
,
"libdevice.10.bc"
)
else
:
else
:
for
fn
in
os
.
listdir
(
lib_path
):
for
fn
in
os
.
listdir
(
lib_path
):
...
...
src/codegen/llvm/codegen_amdgpu.cc
View file @
2bf34581
...
@@ -156,6 +156,7 @@ inline int DetectROCMComputeVersion(const std::string& target) {
...
@@ -156,6 +156,7 @@ inline int DetectROCMComputeVersion(const std::string& target) {
}
}
runtime
::
Module
BuildAMDGPU
(
Array
<
LoweredFunc
>
funcs
,
std
::
string
target
)
{
runtime
::
Module
BuildAMDGPU
(
Array
<
LoweredFunc
>
funcs
,
std
::
string
target
)
{
InitializeLLVM
();
CHECK
(
target
.
length
()
>=
4
&&
CHECK
(
target
.
length
()
>=
4
&&
target
.
substr
(
0
,
4
)
==
"rocm"
);
target
.
substr
(
0
,
4
)
==
"rocm"
);
std
::
ostringstream
config
;
std
::
ostringstream
config
;
...
...
src/codegen/llvm/codegen_nvptx.cc
View file @
2bf34581
...
@@ -166,6 +166,7 @@ inline int DetectCUDAComputeVersion() {
...
@@ -166,6 +166,7 @@ inline int DetectCUDAComputeVersion() {
}
}
runtime
::
Module
BuildNVPTX
(
Array
<
LoweredFunc
>
funcs
,
std
::
string
target
)
{
runtime
::
Module
BuildNVPTX
(
Array
<
LoweredFunc
>
funcs
,
std
::
string
target
)
{
InitializeLLVM
();
CHECK
(
target
.
length
()
>=
5
&&
CHECK
(
target
.
length
()
>=
5
&&
target
.
substr
(
0
,
5
)
==
"nvptx"
);
target
.
substr
(
0
,
5
)
==
"nvptx"
);
int
compute_ver
=
DetectCUDAComputeVersion
();
int
compute_ver
=
DetectCUDAComputeVersion
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment