Skip to content

Commit 9cd54eb

Browse files
committed
Remove JitTarget.
It includes some now-unsupported targets and is also missing some new targets. The obvious thing to do is update it, but it's simpler and better to recognize that it's identical to the generated `driver_sys::CUjit_target` type and instead use that generated type directly, avoiding the need for manual updating in the future. Especially given that there is a non-trivial encoding for targets with 'a' and 'f' suffixes (which involves adding 2^16 and 2^17, respectively, to the base number). This seems fine because this `ModuleJitOption` type is obscure and has no existing uses in the codebase.
1 parent c4bcf73 commit 9cd54eb

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

crates/cust/src/module.rs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,6 @@ pub enum OptLevel {
3434
O4 = 4,
3535
}
3636

37-
/// The possible targets when JIT compiling a PTX module.
38-
#[non_exhaustive]
39-
#[repr(u32)]
40-
#[derive(Debug, Clone, Copy, PartialEq)]
41-
pub enum JitTarget {
42-
Compute20 = 20,
43-
Compute21 = 21,
44-
Compute30 = 30,
45-
Compute32 = 32,
46-
Compute35 = 35,
47-
Compute37 = 37,
48-
Compute50 = 50,
49-
Compute52 = 52,
50-
Compute53 = 53,
51-
Compute60 = 60,
52-
Compute61 = 61,
53-
Compute62 = 62,
54-
Compute70 = 70,
55-
Compute72 = 72,
56-
Compute75 = 75,
57-
Compute80 = 80,
58-
Compute86 = 86,
59-
}
60-
6137
/// How to handle cases where a loaded module's data does not contain an exact match for the
6238
/// specified architecture.
6339
#[repr(u32)]
@@ -82,7 +58,7 @@ pub enum ModuleJitOption {
8258
/// [`ModuleJitOption::Target`].
8359
DetermineTargetFromContext,
8460
/// Specifies the target for the JIT compiler. Cannot be combined with [`ModuleJitOption::DetermineTargetFromContext`].
85-
Target(JitTarget),
61+
Target(driver_sys::CUjit_target),
8662
/// Specifies how to handle cases where a loaded module's data does not have an exact match for the specified
8763
/// architecture.
8864
Fallback(JitFallback),

0 commit comments

Comments
 (0)