Skip to content

Commit

Permalink
Update custom ops to work with fresh install of VS 2022
Browse files Browse the repository at this point in the history
for #115
  • Loading branch information
jannehellsten committed Apr 11, 2022
1 parent a5a69f5 commit 69c7ef0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions torch_utils/custom_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@

def _find_compiler_bindir():
patterns = [
'C:/Program Files (x86)/Microsoft Visual Studio/*/Professional/VC/Tools/MSVC/*/bin/Hostx64/x64',
'C:/Program Files (x86)/Microsoft Visual Studio/*/BuildTools/VC/Tools/MSVC/*/bin/Hostx64/x64',
'C:/Program Files (x86)/Microsoft Visual Studio/*/Community/VC/Tools/MSVC/*/bin/Hostx64/x64',
'C:/Program Files (x86)/Microsoft Visual Studio */vc/bin',
'C:/Program Files*/Microsoft Visual Studio/*/Professional/VC/Tools/MSVC/*/bin/Hostx64/x64',
'C:/Program Files*/Microsoft Visual Studio/*/BuildTools/VC/Tools/MSVC/*/bin/Hostx64/x64',
'C:/Program Files*/Microsoft Visual Studio/*/Community/VC/Tools/MSVC/*/bin/Hostx64/x64',
'C:/Program Files*/Microsoft Visual Studio */vc/bin',
]
for pattern in patterns:
matches = sorted(glob.glob(pattern))
Expand Down
2 changes: 1 addition & 1 deletion torch_utils/ops/bias_act.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _init():
sources=['bias_act.cpp', 'bias_act.cu'],
headers=['bias_act.h'],
source_dir=os.path.dirname(__file__),
extra_cuda_cflags=['--use_fast_math'],
extra_cuda_cflags=['--use_fast_math', '--allow-unsupported-compiler'],
)
return True

Expand Down
2 changes: 1 addition & 1 deletion torch_utils/ops/filtered_lrelu.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _init():
sources=['filtered_lrelu.cpp', 'filtered_lrelu_wr.cu', 'filtered_lrelu_rd.cu', 'filtered_lrelu_ns.cu'],
headers=['filtered_lrelu.h', 'filtered_lrelu.cu'],
source_dir=os.path.dirname(__file__),
extra_cuda_cflags=['--use_fast_math'],
extra_cuda_cflags=['--use_fast_math', '--allow-unsupported-compiler'],
)
return True

Expand Down
2 changes: 1 addition & 1 deletion torch_utils/ops/upfirdn2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _init():
sources=['upfirdn2d.cpp', 'upfirdn2d.cu'],
headers=['upfirdn2d.h'],
source_dir=os.path.dirname(__file__),
extra_cuda_cflags=['--use_fast_math'],
extra_cuda_cflags=['--use_fast_math', '--allow-unsupported-compiler'],
)
return True

Expand Down

0 comments on commit 69c7ef0

Please sign in to comment.