File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1
1
"""Tests for general GPU support"""
2
2
3
- import os
4
3
import subprocess
5
- import sys
6
4
import unittest
7
5
8
6
from common import gpu_test
@@ -14,11 +12,3 @@ def test_system_management_interface(self):
14
12
smi = subprocess .Popen (['nvidia-smi' ], stdout = subprocess .PIPE , stderr = subprocess .STDOUT )
15
13
smi .communicate ()
16
14
self .assertEqual (0 , smi .returncode )
17
-
18
- @gpu_test
19
- def test_pycuda (self ):
20
- import pycuda .driver
21
- pycuda .driver .init ()
22
- gpu_name = pycuda .driver .Device (0 ).name ()
23
- self .assertNotEqual (0 , len (gpu_name ))
24
-
Original file line number Diff line number Diff line change
1
+ """Tests for general GPU support"""
2
+
3
+ import unittest
4
+
5
+ from common import gpu_test
6
+
7
+
8
+ class TestPycuda (unittest .TestCase ):
9
+ @gpu_test
10
+ def test_pycuda (self ):
11
+ import pycuda .driver
12
+ pycuda .driver .init ()
13
+ gpu_name = pycuda .driver .Device (0 ).name ()
14
+ self .assertNotEqual (0 , len (gpu_name ))
You can’t perform that action at this time.
0 commit comments