Skip to content

Commit

Permalink
Fix using nvcc from xdist and also whenever stdin is closed :|
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch committed Aug 10, 2021
1 parent 0bc1611 commit 58b8a43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 3 additions & 1 deletion python/tvm/contrib/nvcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def compile_cuda(code, target="ptx", arch=None, options=None, path_target=None):
# if cxx_compiler_path != "":
# cmd += ["-ccbin", cxx_compiler_path]

proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
# NOTE(areusch): Per https://github.com/lpereira/lwan/issues/106, stdin must be left open.
proc = subprocess.Popen(
cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

(out, _) = proc.communicate()

Expand Down
9 changes: 1 addition & 8 deletions tests/python/unittest/test_auto_scheduler_search_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,4 @@ def apply_func(search_policy, state, stage_id):


if __name__ == "__main__":
test_workload_registry_empty_policy()
test_sketch_search_policy_basic()
test_sketch_search_policy_basic_spawn()
test_sketch_search_policy_xgbmodel()
test_sketch_search_policy_cuda_rpc_runner()
test_sketch_search_policy_cuda_xgbmodel_rpc_runner()
test_sketch_search_policy_zero_rank()
test_sketch_search_policy_custom_sketch()
sys.exit(pytest.main([__file__] + sys.argv[1:]))

0 comments on commit 58b8a43

Please sign in to comment.