Skip to content

Commit b2cdf99

Browse files
committed
change cache to rawmodule
1 parent fb1fb74 commit b2cdf99

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

networks/dsepconv.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,9 @@ def cupy_kernel(strFunction, objectVariables):
509509

510510
@cupy.util.memoize(for_each_device=True)
511511
def cupy_launch(strFunction, strKernel):
512-
return cupy.cuda.compile_with_cache(strKernel).get_function(strFunction)
512+
module = cupy.RawModule(code = strKernel)
513+
return module.get_function(strFunction)
514+
# return cupy.cuda.compile_with_cache(strKernel).get_function(strFunction)
513515

514516

515517
# end
@@ -717,4 +719,4 @@ def forward(self, tensorInput, tensorVertical, tensorHorizontal, tensorOffsetX,
717719
# float floatValue = VALUE_4(input, intSample, intDepth, top, left) * (1 - (delta_x - floor(delta_x))) * (1 - (delta_y - floor(delta_y))) +
718720
# VALUE_4(input, intSample, intDepth, top, right) * (delta_x - floor(delta_x)) * (1 - (delta_y - floor(delta_y))) +
719721
# VALUE_4(input, intSample, intDepth, bottom, left) * (1 - (delta_x - floor(delta_x))) * (delta_y - floor(delta_y)) +
720-
# VALUE_4(input, intSample, intDepth, bottom, right) * (delta_x - floor(delta_x)) * (delta_y - floor(delta_y));
722+
# VALUE_4(input, intSample, intDepth, bottom, right) * (delta_x - floor(delta_x)) * (delta_y - floor(delta_y));

run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
arguments_strFirst = './frame10.png'
1919
arguments_strSecond = './frame11.png'
2020
arguments_strOut = './out.png'
21-
arguments_intDevice = 2
21+
arguments_intDevice = 0
2222
arguments_floatTime = 0.1
2323

2424
for strOption, strArgument in \

0 commit comments

Comments
 (0)