Upload folder using huggingface_hub
Browse files
modules/components/upr_net_freq/costvol.py
CHANGED
@@ -26,7 +26,7 @@ def cuda_float32(fltIn:float):
|
|
26 |
|
27 |
def cuda_kernel(strFunction:str, strKernel:str, objVariables:typing.Dict):
|
28 |
if 'device' not in objCudacache:
|
29 |
-
objCudacache['device'] = "
|
30 |
# end
|
31 |
|
32 |
strKey = strFunction
|
@@ -216,9 +216,9 @@ def cuda_kernel(strFunction:str, strKernel:str, objVariables:typing.Dict):
|
|
216 |
# end
|
217 |
|
218 |
|
219 |
-
@cupy.memoize(for_each_device=True)
|
220 |
def cuda_launch(strKey:str):
|
221 |
-
|
222 |
if 'CUDA_HOME' not in os.environ:
|
223 |
os.environ['CUDA_HOME'] = '/usr/local/cuda/'
|
224 |
# end
|
|
|
26 |
|
27 |
def cuda_kernel(strFunction:str, strKernel:str, objVariables:typing.Dict):
|
28 |
if 'device' not in objCudacache:
|
29 |
+
objCudacache['device'] = "-1"#torch.cuda.get_device_name()
|
30 |
# end
|
31 |
|
32 |
strKey = strFunction
|
|
|
216 |
# end
|
217 |
|
218 |
|
219 |
+
@cupy.memoize(for_each_device=False)#True)
|
220 |
def cuda_launch(strKey:str):
|
221 |
+
|
222 |
if 'CUDA_HOME' not in os.environ:
|
223 |
os.environ['CUDA_HOME'] = '/usr/local/cuda/'
|
224 |
# end
|