diff --git a/cuda_core/cuda/core/_linker.pyx b/cuda_core/cuda/core/_linker.pyx index e5deeb07b10..6a077aafa2a 100644 --- a/cuda_core/cuda/core/_linker.pyx +++ b/cuda_core/cuda/core/_linker.pyx @@ -400,13 +400,13 @@ class LinkerOptions: if self.lineinfo: options.append("-lineinfo") if self.ftz is not None: - options.append(f"-ftz={'true' if self.ftz else 'false'}") + options.append(f"-ftz={'1' if self.ftz else '0'}") if self.prec_div is not None: - options.append(f"-prec-div={'true' if self.prec_div else 'false'}") + options.append(f"-prec-div={'1' if self.prec_div else '0'}") if self.prec_sqrt is not None: - options.append(f"-prec-sqrt={'true' if self.prec_sqrt else 'false'}") + options.append(f"-prec-sqrt={'1' if self.prec_sqrt else '0'}") if self.fma is not None: - options.append(f"-fma={'true' if self.fma else 'false'}") + options.append(f"-fma={'1' if self.fma else '0'}") if self.kernels_used is not None: if isinstance(self.kernels_used, str): options.append(f"-kernels-used={self.kernels_used}") @@ -428,9 +428,9 @@ class LinkerOptions: for opt in self.ptxas_options: options.append(f"-Xptxas={opt}") if self.split_compile is not None: - options.append(f"-split-compile={self.split_compile}") + options.append(f"-split-compile={int(self.split_compile)}") if self.split_compile_extended is not None: - options.append(f"-split-compile-extended={self.split_compile_extended}") + options.append(f"-split-compile-extended={int(self.split_compile_extended)}") if self.no_cache is True: options.append("-no-cache") diff --git a/cuda_core/tests/test_linker.py b/cuda_core/tests/test_linker.py index e25578c3dd1..ba9455d799e 100644 --- a/cuda_core/tests/test_linker.py +++ b/cuda_core/tests/test_linker.py @@ -206,7 +206,7 @@ def test_linker_options_as_bytes_nvjitlink(): options_str = [opt.decode() for opt in nvjitlink_options] assert "-arch=sm_80" in options_str assert "-g" in options_str - assert "-ftz=true" in options_str + assert "-ftz=1" in options_str assert "-maxrregcount=32" in options_str