Skip to content

Commit

Permalink
forgot to increment KERNEL_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Oct 10, 2023
1 parent 7ce0576 commit 926e830
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion luisa_compute/src/runtime/kernel.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::lang::{pop_recorder, push_recorder, soa::SoaMetadata};
use crate::lang::{pop_recorder, push_recorder, soa::SoaMetadata, KERNEL_ID};

use super::*;

Expand Down Expand Up @@ -191,6 +191,7 @@ impl KernelBuilder {
let r = r.borrow();
if is_kernel {
assert!(r.is_none(), "Cannot record a kernel inside another kernel");
KERNEL_ID.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
}
});
push_recorder();
Expand Down
2 changes: 1 addition & 1 deletion luisa_compute/tests/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ fn callable_return_void_mismatch() {
}
#[test]
#[should_panic]
fn callable_illegall_sharing() {
fn callable_illegal_sharing() {
let device = get_device();
let tid = RefCell::new(None);
Kernel::<fn()>::new(&device, &|| {
Expand Down

0 comments on commit 926e830

Please sign in to comment.