Tweak some metal tests. (#2528)

This commit is contained in:
Laurent Mazare
2024-10-02 10:22:31 +02:00
committed by GitHub
parent a2bcc227df
commit fd08d3d0a4
2 changed files with 23 additions and 62 deletions

View File

@ -2372,16 +2372,11 @@ pub fn call_const_fill(
let pipeline = kernels.load_pipeline(device, Source::Fill, name)?;
let encoder = ep.encoder();
let encoder: &ComputeCommandEncoderRef = encoder.as_ref();
encoder.set_compute_pipeline_state(&pipeline);
set_params!(encoder, (output, v, length));
let (thread_group_count, thread_group_size) = linear_split(&pipeline, length);
encoder.use_resource(output, metal::MTLResourceUsage::Write);
encoder.dispatch_thread_groups(thread_group_count, thread_group_size);
Ok(())
}