Skip to content

Commit 689a7a2

Browse files
jorge-ortegaLegNeato
authored andcommitted
Updates rust-toolchain to nightly-02-20.
This includes several updates to the backend based on changes in rustc_codegen_llvm, which brings some bug fixes and a refactor to debug info. This fixes failing dependencies that resolved to newer versions that failed to build on the previous nightly. Removes depending on rustc_codegen_llvm as it can't be imported with the new toolchain for some reason. The example cuda kernals fail to build. Their dependencies cause nvvm to abort with ICE.
1 parent 54f476c commit 689a7a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4393
-3961
lines changed

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[workspace]
2-
32
resolver = "2"
4-
53
members = [
64
"crates/*",
75
"crates/optix/examples/ex*",

crates/cuda_std/src/atomic/intrinsics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
use crate::gpu_only;
44
use core::concat;
5+
use core::arch::asm;
56
use paste::paste;
67

78
#[gpu_only]

crates/cuda_std/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
//! In order to simplify imports, we provide a prelude module which contains GPU analogues to standard library
2222
//! structures as well as common imports such as [`thread`].
2323
24+
#![allow(internal_features)]
2425
#![cfg_attr(
2526
target_os = "cuda",
2627
no_std,
2728
feature(
28-
register_attr,
2929
alloc_error_handler,
30-
asm,
3130
asm_experimental_arch,
3231
link_llvm_intrinsics
3332
),

crates/cuda_std/src/mem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub static GLOBAL_ALLOCATOR: CUDAAllocator = CUDAAllocator;
3737
pub fn dynamic_smem_size() -> u32 {
3838
let mut out;
3939
unsafe {
40-
asm!(
40+
core::arch::asm!(
4141
"mov.u32 {}, %dynamic_smem_size",
4242
out(reg32) out
4343
)
@@ -55,7 +55,7 @@ pub fn dynamic_smem_size() -> u32 {
5555
pub fn total_smem_size() -> u32 {
5656
let mut out;
5757
unsafe {
58-
asm!(
58+
core::arch::asm!(
5959
"mov.u32 {}, %total_smem_size",
6060
out(reg32) out
6161
)

crates/cuda_std/src/misc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Misc functions that do not exactly fit into other categories.
22
33
use crate::gpu_only;
4+
use core::arch::asm;
45

56
/// Suspends execution of the kernel, usually to pause at a specific point when debugging in a debugger.
67
#[gpu_only]

crates/cuda_std/src/ptr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! CUDA-specific pointer handling logic.
22
33
use crate::gpu_only;
4+
use core::arch::asm;
45

56
/// Special areas of GPU memory where a pointer could reside.
67
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]

crates/cuda_std/src/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ pub fn system_fence() {
344344
#[inline(always)]
345345
pub fn nanosleep(nanos: u32) {
346346
unsafe {
347-
asm!(
347+
core::arch::asm!(
348348
"nanosleep {}",
349349
in(reg32) nanos
350350
)

crates/cuda_std/src/warp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! thread blocks and execute in SIMT fashion.
55
66
use crate::gpu_only;
7+
use core::arch::asm;
78
use half::{bf16, f16};
89

910
/// Synchronizes all of the threads inside of this warp according to `mask`.

crates/cust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl_num_complex = ["cust_core/num-complex", "num-complex"]
3535
find_cuda_helper = { path = "../find_cuda_helper", version = "0.2" }
3636

3737
[dev-dependencies]
38-
image = "0.23.14"
38+
image = "0.25.5"
3939

4040
[package.metadata.docs.rs]
4141
rustdoc-args = ["--cfg", "docsrs"]

crates/find_cuda_helper/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! Tiny crate for common logic for finding and including CUDA.
22
3-
use std::process::Command;
43
use std::{
54
env,
65
path::{Path, PathBuf},
@@ -154,6 +153,7 @@ pub fn find_cuda_lib_dirs() -> Vec<PathBuf> {
154153

155154
#[cfg(not(target_os = "windows"))]
156155
fn detect_cuda_root_via_which_nvcc() -> PathBuf {
156+
use std::process::Command;
157157
let output = Command::new("which")
158158
.arg("nvcc")
159159
.output()

0 commit comments

Comments
 (0)