Skip to content

Commit

Permalink
Sync ggml metal kernels (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler authored Oct 25, 2024
1 parent 6287750 commit 1f8a28a
Show file tree
Hide file tree
Showing 2 changed files with 5,587 additions and 3,179 deletions.
7 changes: 5 additions & 2 deletions candle-core/benches/benchmarks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub(crate) mod random;
pub(crate) mod unary;
pub(crate) mod where_cond;

use candle_core::{cuda::WrapErr, Device, Result};
use candle_core::{Device, Result};

pub(crate) trait BenchDevice {
fn sync(&self) -> Result<()>;
Expand All @@ -20,7 +20,10 @@ impl BenchDevice for Device {
Device::Cpu => Ok(()),
Device::Cuda(device) => {
#[cfg(feature = "cuda")]
return Ok(device.synchronize().w()?);
{
use cuda::WrapErr;
return Ok(device.synchronize().w()?);
}
#[cfg(not(feature = "cuda"))]
panic!("Cuda device without cuda feature enabled: {:?}", device)
}
Expand Down
Loading

0 comments on commit 1f8a28a

Please sign in to comment.