Skip to content

Commit

Permalink
check driver mismatch (#1811)
Browse files Browse the repository at this point in the history
* check driver mismatch

* update
  • Loading branch information
grimoire authored Jun 20, 2024
1 parent 4eaf473 commit 07e0c79
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lmdeploy/pytorch/check_env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ def check_env_triton():
b = a.new_tensor([3, 4], device='cuda')
c = custom_add(a, b)
torch.testing.assert_close(c, a + b)
except RuntimeError as e:
ptxas_error = 'device kernel image is invalid'
if len(e.args) > 0 and ptxas_error in e.args[0]:
msg = (
'This Error might caused by mismatching between NVIDIA Driver and nvcc compiler. \n' # noqa: E501
'Try solution https://github.com/triton-lang/triton/issues/1955#issuecomment-1929908209' # noqa: E501
' or reinstall the driver.')
else:
msg = None
_handle_exception(e, 'Triton', logger, msg)
except Exception as e:
_handle_exception(e, 'Triton', logger)

Expand Down

0 comments on commit 07e0c79

Please sign in to comment.