Skip to content

Commit a106692

Browse files
committed
addressing comments
1 parent 5bfdf3f commit a106692

File tree

7 files changed

+60
-71
lines changed

7 files changed

+60
-71
lines changed

crates/find_cuda_helper/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ pub fn find_cuda_root() -> Option<PathBuf> {
5555
None
5656
}
5757

58-
// pub fn find_cuda_root() -> Option<PathBuf> {
59-
// Some(PathBuf::from("/usr/lib/cuda"))
60-
// }
61-
6258
#[cfg(target_os = "windows")]
6359
pub fn find_cuda_lib_dirs() -> Vec<PathBuf> {
6460
if let Some(root_path) = find_cuda_root() {

examples/cuda/cpu/path_tracer/src/optix/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl OptixRenderer {
132132
}
133133
}
134134
}
135-
let buf= DeviceBuffer::from_slice(&aabbs)?;
135+
let buf = DeviceBuffer::from_slice(&aabbs)?;
136136

137137
let mut build_inputs = Vec::with_capacity(buf.len());
138138
let mut aabb_slices = Vec::with_capacity(buf.len());
@@ -156,7 +156,6 @@ impl OptixRenderer {
156156
// correctly
157157
Ok(gas)
158158
}
159-
160159

161160
fn build_scene_hitgroup_records(
162161
scene: &Scene,

examples/cuda/cpu/path_tracer/src/renderer.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use glium::glutin::{
2-
event_loop::ControlFlow,
3-
event::Event,
4-
};
1+
use glium::glutin::{event::Event, event_loop::ControlFlow};
52
use imgui::Ui;
63
use path_tracer_gpu::scene::Scene;
74
use sysinfo::{System, SystemExt};

examples/cuda/cpu/path_tracer/src/viewer.rs

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
use glium::{
2-
implement_vertex,
3-
index::{NoIndices, PrimitiveType},
4-
texture::{RawImage2d, SrgbTexture2d},
52
glutin::{
6-
window::WindowBuilder,
7-
event_loop::{EventLoop, ControlFlow},
8-
ContextBuilder,
3+
dpi::PhysicalSize,
94
event::{Event, WindowEvent},
10-
dpi::PhysicalSize
5+
event_loop::{ControlFlow, EventLoop},
6+
window::WindowBuilder,
7+
ContextBuilder,
118
},
9+
implement_vertex,
10+
index::{NoIndices, PrimitiveType},
11+
texture::{RawImage2d, SrgbTexture2d},
1212
uniform, Display, Program, Rect, Surface, VertexBuffer,
1313
};
14-
// use glutin::{
15-
// dpi::PhysicalSize,
16-
// event::{Event, WindowEvent},
17-
// event_loop::{ControlFlow, EventLoop},
18-
// ContextBuilder,
19-
// };
2014

2115
use imgui::Condition;
2216
use imgui_winit_support::{HiDpiMode, WinitPlatform};
@@ -62,7 +56,7 @@ pub fn run(camera: &Camera, scene: &Scene) -> ! {
6256
let event_loop = EventLoop::new();
6357
let wb = WindowBuilder::new()
6458
.with_title("Render")
65-
.with_inner_size(PhysicalSize::new(WIDTH as f64, HEIGHT as f64)); // Explicitly specify f64
59+
.with_inner_size(PhysicalSize::new(WIDTH as f64, HEIGHT as f64));
6660
let cb = ContextBuilder::new().with_vsync(true);
6761
let display = Display::new(wb, cb, event_loop.deref()).unwrap();
6862
let renderer = Renderer::new(Vec2::new(WIDTH as usize, HEIGHT as usize), camera, scene);
@@ -190,7 +184,8 @@ impl ViewerRenderer {
190184
..
191185
} = self;
192186
let ui = self.imgui_ctx.frame();
193-
let out = ui.window("crab")
187+
let out = ui
188+
.window("crab")
194189
.size([300.0, 300.0], Condition::FirstUseEver)
195190
.build(|| renderer.render(&ui))
196191
.unwrap();

examples/cuda/gpu/path_tracer_gpu/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(target_os = "cuda", no_std)]
21
#![allow(clippy::missing_safety_doc)]
32

43
extern crate alloc;

rustc-ice-2025-03-15T03_46_45-55918.txt

-45
This file was deleted.
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
thread 'coordinator' panicked at /home/trigpolynom/.rustup/toolchains/nightly-2025-03-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/back/write.rs:1686:29:
2+
/home/trigpolynom/.rustup/toolchains/nightly-2025-03-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/back/write.rs:1686:29: worker thread panicked
3+
stack backtrace:
4+
0: 0x7b68e9c1b4a5 - std::backtrace::Backtrace::create::h4caae72ea1d639e2
5+
1: 0x7b68e7fa9495 - std::backtrace::Backtrace::force_capture::hed7edc9d6077f7f2
6+
2: 0x7b68e7118b5e - std[e7ccd300aecc5933]::panicking::update_hook::<alloc[8cc49891b291256f]::boxed::Box<rustc_driver_impl[b622dd38a520489a]::install_ice_hook::{closure#1}>>::{closure#0}
7+
3: 0x7b68e7118417 - std[e7ccd300aecc5933]::panicking::update_hook::<alloc[8cc49891b291256f]::boxed::Box<rustc_driver_impl[b622dd38a520489a]::install_ice_hook::{closure#1}>>::{closure#0}
8+
4: 0x7b68e7fc1da3 - std::panicking::rust_panic_with_hook::h98fc165e90ef379e
9+
5: 0x7b68e76badc2 - std[e7ccd300aecc5933]::panicking::begin_panic::<alloc[8cc49891b291256f]::string::String>::{closure#0}
10+
6: 0x7b68e76b5866 - std[e7ccd300aecc5933]::sys::backtrace::__rust_end_short_backtrace::<std[e7ccd300aecc5933]::panicking::begin_panic<alloc[8cc49891b291256f]::string::String>::{closure#0}, !>
11+
7: 0x7b68e76b4792 - std[e7ccd300aecc5933]::panicking::begin_panic::<alloc[8cc49891b291256f]::string::String>
12+
8: 0x7b68e7736517 - rustc_middle[464f7c4b782fc90]::util::bug::opt_span_bug_fmt::<rustc_span[eeaf0b3b2812840a]::span_encoding::Span>::{closure#0}
13+
9: 0x7b68e771de1a - rustc_middle[464f7c4b782fc90]::ty::context::tls::with_opt::<rustc_middle[464f7c4b782fc90]::util::bug::opt_span_bug_fmt<rustc_span[eeaf0b3b2812840a]::span_encoding::Span>::{closure#0}, !>::{closure#0}
14+
10: 0x7b68e771dc8b - rustc_middle[464f7c4b782fc90]::ty::context::tls::with_context_opt::<rustc_middle[464f7c4b782fc90]::ty::context::tls::with_opt<rustc_middle[464f7c4b782fc90]::util::bug::opt_span_bug_fmt<rustc_span[eeaf0b3b2812840a]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
15+
11: 0x7b68e5894bc0 - rustc_middle[464f7c4b782fc90]::util::bug::bug_fmt
16+
12: 0x7b68d2ab1bd4 - std::sys::backtrace::__rust_begin_short_backtrace::h8e99448a5d5a54a3
17+
13: 0x7b68d2a840fe - core::ops::function::FnOnce::call_once{{vtable.shim}}::h88d5aa75b298fd0a
18+
14: 0x7b68e975b8ab - std::sys::pal::unix::thread::Thread::new::thread_start::h20288ab9ea215a81
19+
15: 0x7b68e3694ac3 - start_thread
20+
at ./nptl/pthread_create.c:442:8
21+
16: 0x7b68e3726850 - __GI___clone3
22+
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81:0
23+
17: 0x0 - <unknown>
24+
25+
26+
rustc version: 1.87.0-nightly (8c392966a 2025-03-01)
27+
platform: x86_64-unknown-linux-gnuthread 'coordinator' panicked at /home/trigpolynom/.rustup/toolchains/nightly-2025-03-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/back/write.rs:1686:29:
28+
/home/trigpolynom/.rustup/toolchains/nightly-2025-03-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/back/write.rs:1686:29: worker thread panicked
29+
stack backtrace:
30+
0: 0x7b68e9c1b4a5 - std::backtrace::Backtrace::create::h4caae72ea1d639e2
31+
1: 0x7b68e7fa9495 - std::backtrace::Backtrace::force_capture::hed7edc9d6077f7f2
32+
2: 0x7b68e7118b5e - std[e7ccd300aecc5933]::panicking::update_hook::<alloc[8cc49891b291256f]::boxed::Box<rustc_driver_impl[b622dd38a520489a]::install_ice_hook::{closure#1}>>::{closure#0}
33+
3: 0x7b68e7fc1da3 - std::panicking::rust_panic_with_hook::h98fc165e90ef379e
34+
4: 0x7b68e76badc2 - std[e7ccd300aecc5933]::panicking::begin_panic::<alloc[8cc49891b291256f]::string::String>::{closure#0}
35+
5: 0x7b68e76b5866 - std[e7ccd300aecc5933]::sys::backtrace::__rust_end_short_backtrace::<std[e7ccd300aecc5933]::panicking::begin_panic<alloc[8cc49891b291256f]::string::String>::{closure#0}, !>
36+
6: 0x7b68e76b4792 - std[e7ccd300aecc5933]::panicking::begin_panic::<alloc[8cc49891b291256f]::string::String>
37+
7: 0x7b68e7736517 - rustc_middle[464f7c4b782fc90]::util::bug::opt_span_bug_fmt::<rustc_span[eeaf0b3b2812840a]::span_encoding::Span>::{closure#0}
38+
8: 0x7b68e771de1a - rustc_middle[464f7c4b782fc90]::ty::context::tls::with_opt::<rustc_middle[464f7c4b782fc90]::util::bug::opt_span_bug_fmt<rustc_span[eeaf0b3b2812840a]::span_encoding::Span>::{closure#0}, !>::{closure#0}
39+
9: 0x7b68e771dc8b - rustc_middle[464f7c4b782fc90]::ty::context::tls::with_context_opt::<rustc_middle[464f7c4b782fc90]::ty::context::tls::with_opt<rustc_middle[464f7c4b782fc90]::util::bug::opt_span_bug_fmt<rustc_span[eeaf0b3b2812840a]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
40+
10: 0x7b68e5894bc0 - rustc_middle[464f7c4b782fc90]::util::bug::bug_fmt
41+
11: 0x7b68d2ab1bd4 - std::sys::backtrace::__rust_begin_short_backtrace::h8e99448a5d5a54a3
42+
12: 0x7b68d2a840fe - core::ops::function::FnOnce::call_once{{vtable.shim}}::h88d5aa75b298fd0a
43+
13: 0x7b68e975b8ab - std::sys::pal::unix::thread::Thread::new::thread_start::h20288ab9ea215a81
44+
14: 0x7b68e3694ac3 - start_thread
45+
at ./nptl/pthread_create.c:442:8
46+
15: 0x7b68e3726850 - __GI___clone3
47+
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81:0
48+
16: 0x0 - <unknown>

0 commit comments

Comments
 (0)