Skip to content

Commit 6e0fdf7

Browse files
committed
Updated supported architectures on the whole project
Everything should have been correctly updated but I may have missed some files. These changes should not break any existing code anyway.
1 parent d607f5f commit 6e0fdf7

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

crates/cuda_std/src/cfg.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ pub enum ComputeCapability {
1616
Compute72,
1717
Compute75,
1818
Compute80,
19+
Compute86,
20+
Compute87,
21+
Compute89,
22+
Compute90,
1923
}
2024

2125
impl ComputeCapability {
@@ -42,6 +46,10 @@ impl ComputeCapability {
4246
"720" => ComputeCapability::Compute72,
4347
"750" => ComputeCapability::Compute75,
4448
"800" => ComputeCapability::Compute80,
49+
"860" => ComputeCapability::Compute86,
50+
"870" => ComputeCapability::Compute87,
51+
"890" => ComputeCapability::Compute89,
52+
"900" => ComputeCapability::Compute90,
4553
_ => panic!("CUDA_ARCH had an invalid value"),
4654
}
4755
}

crates/cust/src/module.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ pub enum JitTarget {
5454
Compute75 = 75,
5555
Compute80 = 80,
5656
Compute86 = 86,
57+
Compute87 = 87,
58+
Compute89 = 89,
59+
Compute90 = 90,
5760
}
5861

5962
/// How to handle cases where a loaded module's data does not contain an exact match for the

crates/nvvm/src/lib.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ impl FromStr for NvvmOption {
254254
"72" => NvvmArch::Compute72,
255255
"75" => NvvmArch::Compute75,
256256
"80" => NvvmArch::Compute80,
257+
"86" => NvvmArch::Compute86,
258+
"87" => NvvmArch::Compute87,
259+
"89" => NvvmArch::Compute89,
260+
"90" => NvvmArch::Compute90,
257261
_ => return Err("unknown arch"),
258262
};
259263
Self::Arch(arch)
@@ -266,18 +270,38 @@ impl FromStr for NvvmOption {
266270
/// Nvvm architecture, default is `Compute52`
267271
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
268272
pub enum NvvmArch {
273+
/// Kepler architecture (deprecated since CUDA 9).
269274
Compute35,
275+
/// Kepler architecture (deprecated since CUDA 9).
270276
Compute37,
277+
/// Maxwell architecture (deprecated since CUDA 11.6).
271278
Compute50,
279+
/// Maxwell architecture (deprecated since CUDA 11.6).
272280
Compute52,
281+
/// Maxwell architecture (deprecated since CUDA 11.6) for 1st gen Jetson devices.
273282
Compute53,
283+
/// Pascal architecture.
274284
Compute60,
285+
/// Pascal architecture.
275286
Compute61,
287+
/// Pascal architecture.
276288
Compute62,
289+
/// Volta architecture.
277290
Compute70,
291+
/// Volta architecture (Xavier devices).
278292
Compute72,
293+
/// Turing architecture.
279294
Compute75,
295+
/// Ampere architecture.
280296
Compute80,
297+
/// Ampere architecture.
298+
Compute86,
299+
/// Ampere architecture (Orin devices).
300+
Compute87,
301+
/// Ada Lovelace architecture.
302+
Compute89,
303+
/// Hopper architecture.
304+
Compute90,
281305
}
282306

283307
impl Display for NvvmArch {
@@ -432,6 +456,10 @@ mod tests {
432456
"-arch=compute_72",
433457
"-arch=compute_75",
434458
"-arch=compute_80",
459+
"-arch=compute_86",
460+
"-arch=compute_87",
461+
"-arch=compute_89",
462+
"-arch=compute_90",
435463
"-ftz=1",
436464
"-prec-sqrt=0",
437465
"-prec-div=0",
@@ -453,6 +481,10 @@ mod tests {
453481
Arch(Compute72),
454482
Arch(Compute75),
455483
Arch(Compute80),
484+
Arch(Compute86),
485+
Arch(Compute87),
486+
Arch(Compute89),
487+
Arch(Compute90),
456488
Ftz,
457489
FastSqrt,
458490
FastDiv,

crates/nvvm/src/sys.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ extern "C" {
182182
#[doc = " - compute_72"]
183183
#[doc = " - compute_75"]
184184
#[doc = " - compute_80"]
185+
#[doc = " - compute_86"]
186+
#[doc = " - compute_87"]
187+
#[doc = " - compute_89"]
188+
#[doc = " - compute_90"]
185189
#[doc = " - -ftz="]
186190
#[doc = " - 0 (default, preserve denormal values, when performing"]
187191
#[doc = " single-precision floating-point operations)"]

0 commit comments

Comments
 (0)