Skip to content

Commit

Permalink
Extra testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vecvec committed Feb 24, 2025
1 parent aae428b commit 5d9548f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/tests/ray_tracing/as_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fn blas_compaction(ctx: TestingContext) {

ctx.queue.submit([encoder.finish()]);

// Prepare
// Prepare the BLAS to be compacted.
let (send, recv) = std::sync::mpsc::channel();
as_ctx.blas.prepare_compaction_async(move |res| {
res.unwrap();
Expand All @@ -152,6 +152,8 @@ fn blas_compaction(ctx: TestingContext) {
ctx.device.poll(Maintain::Wait);
// Check that the callback actually gets called (this test will timeout if it doesn't).
recv.recv().unwrap();
// This should return true because the callback has been called, and we haven't rebuilt the BLAS
assert!(as_ctx.blas.ready_for_compaction());

let compacted = ctx.queue.compact_blas(&as_ctx.blas);

Expand All @@ -162,6 +164,7 @@ fn blas_compaction(ctx: TestingContext) {
.device
.create_command_encoder(&CommandEncoderDescriptor::default());

// Try to build the compacted BLAS, this should fail.
let mut build_entry = as_ctx.blas_build_entry();
build_entry.blas = &compacted;

Expand Down

0 comments on commit 5d9548f

Please sign in to comment.