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
69759c0c
Commit
69759c0c
authored
Oct 22, 2017
by
Hu Shiwen
Committed by
Tianqi Chen
Oct 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add friendly tips when not found cl and link (#574)
* add friendly tips when not found cl and link * fix lint
parent
1791b121
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
python/tvm/contrib/cc.py
+14
-7
No files found.
python/tvm/contrib/cc.py
View file @
69759c0c
...
...
@@ -79,10 +79,13 @@ BOOL APIENTRY DllMain( HMODULE hModule,\
temp_path
=
dllmain_path
.
replace
(
"dllmain.cc"
,
""
)
cl_cmd
+=
[
"-Fo:"
+
temp_path
]
proc
=
subprocess
.
Popen
(
cl_cmd
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
(
out
,
_
)
=
proc
.
communicate
()
try
:
proc
=
subprocess
.
Popen
(
cl_cmd
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
(
out
,
_
)
=
proc
.
communicate
()
except
FileNotFoundError
:
raise
RuntimeError
(
"can not found cl.exe,"
"please run this in Vistual Studio Command Prompt."
)
if
proc
.
returncode
!=
0
:
msg
=
"Compilation error:
\n
"
msg
+=
str
(
out
)
...
...
@@ -102,9 +105,13 @@ BOOL APIENTRY DllMain( HMODULE hModule,\
link_cmd
+=
[
temp_path
+
"dllmain.obj"
]
link_cmd
+=
[
"-out:"
+
output
]
proc
=
subprocess
.
Popen
(
link_cmd
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
(
out
,
_
)
=
proc
.
communicate
()
try
:
proc
=
subprocess
.
Popen
(
link_cmd
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
(
out
,
_
)
=
proc
.
communicate
()
except
FileNotFoundError
:
raise
RuntimeError
(
"can not found link.exe,"
"please run this in Vistual Studio Command Prompt."
)
if
proc
.
returncode
!=
0
:
msg
=
"Compilation error:
\n
"
msg
+=
str
(
out
)
...
...
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