Skip to content

Commit 6547d34

Browse files
committed
fix ci bug
1 parent a13a400 commit 6547d34

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

python/jittor/init_cupy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
has_cupy = 0
1111
try:
12-
import cupy
12+
import cupy as cp
1313
has_cupy = 1
1414
except:
1515
pass

python/jittor/test/__main__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@
3434
suite.addTest(unittest.defaultTestLoader.loadTestsFromName(
3535
"jittor.test."+test_name))
3636

37-
unittest.TextTestRunner(verbosity=3).run(suite)
37+
result = unittest.TextTestRunner(verbosity=3).run(suite)
38+
if len(result.errors) or len(result.failures):
39+
exit(1)

src/opt/pass/atomic_tuner_pass.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void AtomicTunerPass::run() {
223223
for (uint i=0; i<ir->before.size(); i++) {
224224
auto& func_call = ir->before[i];
225225
// TODO: remove this if
226-
if (func_call->get_attr("dtype") != "__global__ void") continue;
226+
if (func_call->get_attr("dtype").find("__global__ void") == string::npos) continue;
227227
tune_atomic(this, func_call.get(), is_cuda, 4, sorder, sfunc);
228228
}
229229

0 commit comments

Comments
 (0)