File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
cuda_core/cuda/core/experimental Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -205,15 +205,15 @@ def _init_nvjitlink(self):
205
205
self .formatted_options .append ("-time" )
206
206
if self .verbose is not None :
207
207
self .formatted_options .append ("-verbose" )
208
- if self .link_time_optimization is not None :
208
+ if self .link_time_optimization is not None and self . link_time_optimization :
209
209
self .formatted_options .append ("-lto" )
210
210
if self .ptx is not None :
211
211
self .formatted_options .append ("-ptx" )
212
212
if self .optimization_level is not None :
213
213
self .formatted_options .append (f"-O{ self .optimization_level } " )
214
- if self .debug is not None :
214
+ if self .debug is not None and self . debug :
215
215
self .formatted_options .append ("-g" )
216
- if self .lineinfo is not None :
216
+ if self .lineinfo is not None and self . lineinfo :
217
217
self .formatted_options .append ("-lineinfo" )
218
218
if self .ftz is not None :
219
219
self .formatted_options .append (f"-ftz={ 'true' if self .ftz else 'false' } " )
Original file line number Diff line number Diff line change @@ -244,8 +244,8 @@ def __post_init__(self):
244
244
self ._formatted_options .append ("--device-debug" )
245
245
if self .lineinfo is not None and self .lineinfo :
246
246
self ._formatted_options .append ("--generate-line-info" )
247
- if self .device_code_optimize is not None :
248
- self ._formatted_options .append (f "--dopt={ 'on' if self . device_code_optimize else 'off' } " )
247
+ if self .device_code_optimize is not None and self . device_code_optimize :
248
+ self ._formatted_options .append ("--dopt=on " )
249
249
if self .ptxas_options is not None :
250
250
opt_name = "--ptxas-options"
251
251
if isinstance (self .ptxas_options , str ):
@@ -351,7 +351,7 @@ def _as_bytes(self):
351
351
352
352
def __repr__ (self ):
353
353
# __TODO__ improve this
354
- return self ._formatted_options
354
+ return str ( self ._formatted_options )
355
355
356
356
357
357
ProgramHandleT = Union ["cuda.bindings.nvrtc.nvrtcProgram" , LinkerHandleT ]
You can’t perform that action at this time.
0 commit comments