Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
69759c0c
Commit
69759c0c
authored
7 years ago
by
Hu Shiwen
Committed by
Tianqi Chen
7 years ago
Browse files
Options
Downloads
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
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/tvm/contrib/cc.py
+14
-7
14 additions, 7 deletions
python/tvm/contrib/cc.py
with
14 additions
and
7 deletions
python/tvm/contrib/cc.py
+
14
−
7
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment