File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2121 f'version { major } .{ minor } .' )
2222 raise OSError (e )
2323
24- cuda_version = torch .ops .torch_sparse .cuda_version ()
25- if cuda_version != - 1 and torch .version .cuda is not None : # pragma: no cover
26- if cuda_version < 10000 :
24+ if torch .version .cuda is not None : # pragma: no cover
25+ cuda_version = torch .ops .torch_sparse .cuda_version ()
26+
27+ if cuda_version == - 1 :
28+ major = minor = 0
29+ elif cuda_version < 10000 :
2730 major , minor = int (str (cuda_version )[0 ]), int (str (cuda_version )[2 ])
2831 else :
2932 major , minor = int (str (cuda_version )[0 :2 ]), int (str (cuda_version )[3 ])
3033 t_major , t_minor = [int (x ) for x in torch .version .cuda .split ('.' )]
31- cuda_version = str (major ) + '.' + str (minor )
3234
3335 if t_major != major or t_minor != minor :
3436 raise RuntimeError (
You can’t perform that action at this time.
0 commit comments