Skip to content
Snippets Groups Projects
Commit 215325c4 authored by Richter, Julius's avatar Richter, Julius
Browse files

skip loading of upfirn2d to run without CUDA

parent fca2c4cc
No related branches found
No related tags found
No related merge requests found
from .fused_act import FusedLeakyReLU, fused_leaky_relu
from .upfirdn2d import upfirdn2d from .upfirdn2d import upfirdn2d
\ No newline at end of file
...@@ -7,6 +7,8 @@ from torch.utils.cpp_extension import load ...@@ -7,6 +7,8 @@ from torch.utils.cpp_extension import load
module_path = os.path.dirname(__file__) module_path = os.path.dirname(__file__)
if torch.cuda.is_available():
upfirdn2d_op = load( upfirdn2d_op = load(
"upfirdn2d", "upfirdn2d",
sources=[ sources=[
...@@ -14,7 +16,8 @@ upfirdn2d_op = load( ...@@ -14,7 +16,8 @@ upfirdn2d_op = load(
os.path.join(module_path, "upfirdn2d_kernel.cu"), os.path.join(module_path, "upfirdn2d_kernel.cu"),
], ],
) )
else:
upfirdn2d_op = None
class UpFirDn2dBackward(Function): class UpFirDn2dBackward(Function):
@staticmethod @staticmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment