jwfromm opened a new pull request #7063:
URL: https://github.com/apache/tvm/pull/7063
The recent addition of tensorcore schedules has broken TVM's ability to
compile for cuda on a machine without a GPU. This is because the strategy
registration for tensorcores calls `tvm.gpu(0).compute_version`, which fails
when no gpu is present. I've changed the behavior of `nvcc.have_tensorcore` to
check `AutotvmGlobalScope.current.cuda_target_arch` when a GPU isn't present.
This allows a user to call something like
`tvm.autotvm.measure.measure_methods.set_cuda_target_arch("sm_62")` to specify
a cuda cross compilation target on a machine without a GPU and build correctly.
I'm not sure how to test this since it would require a CPU node that's built
with the cuda toolkit. Let me know if you have an opinion on tests to add to
prevent an error like this from sneaking in again.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]