Skip to content

Commit f515b30

Browse files
authored
fast compile program options (#3289)
1 parent a99335a commit f515b30

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

‎cuda_core/cuda/core/_program.pyx‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,6 +1448,30 @@ cdef inline object _prepare_nvvm_options_impl(object opts, bint as_bytes):
14481448
unsupported.append("fdevice_syntax_only")
14491449
if opts.minimal is not None and opts.minimal:
14501450
unsupported.append("minimal")
1451+
if opts.no_cache is not None and opts.no_cache:
1452+
unsupported.append("no_cache")
1453+
if opts.fdevice_time_trace is not None:
1454+
unsupported.append("fdevice_time_trace")
1455+
if opts.device_float128 is not None and opts.device_float128:
1456+
unsupported.append("device_float128")
1457+
if opts.frandom_seed is not None:
1458+
unsupported.append("frandom_seed")
1459+
if opts.ofast_compile is not None:
1460+
unsupported.append("ofast_compile")
1461+
if opts.pch is not None and opts.pch:
1462+
unsupported.append("pch")
1463+
if opts.create_pch is not None:
1464+
unsupported.append("create_pch")
1465+
if opts.use_pch is not None:
1466+
unsupported.append("use_pch")
1467+
if opts.pch_dir is not None:
1468+
unsupported.append("pch_dir")
1469+
if opts.pch_verbose is not None:
1470+
unsupported.append("pch_verbose")
1471+
if opts.pch_messages is not None:
1472+
unsupported.append("pch_messages")
1473+
if opts.instantiate_templates_in_pch is not None:
1474+
unsupported.append("instantiate_templates_in_pch")
14511475
if unsupported:
14521476
raise CUDAError(f"The following options are not supported by NVVM backend: {', '.join(unsupported)}")
14531477

‎cuda_core/tests/test_program.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,18 @@ def test_program_options_bad_define_macro_nested_list_invalid_element():
13571357
{"split_compile": 2},
13581358
{"fdevice_syntax_only": True},
13591359
{"minimal": True},
1360+
{"no_cache": True},
1361+
{"fdevice_time_trace": "trace.json"},
1362+
{"device_float128": True},
1363+
{"frandom_seed": "1"},
1364+
{"ofast_compile": "0"},
1365+
{"pch": True},
1366+
{"create_pch": "out.pch"},
1367+
{"use_pch": "in.pch"},
1368+
{"pch_dir": "pch-cache"},
1369+
{"pch_verbose": False},
1370+
{"pch_messages": False},
1371+
{"instantiate_templates_in_pch": False},
13601372
],
13611373
ids=lambda kw: next(iter(kw)),
13621374
)

0 commit comments

Comments
 (0)