Skip to content

Commit

Permalink
chore: upgrade to latest rust-gpu-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
vmx committed Mar 15, 2021
1 parent 80c9a9c commit cdd1d24
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ blstrs = { version = "0.2", optional = true }
paired = { version = "0.21.0", optional = true }

# gpu feature
rust-gpu-tools = { version = "0.2.0", optional = true }
rust-gpu-tools = { version = "0.3.0", optional = true }
ff-cl-gen = { version = "0.2.0", optional = true }
fs2 = { version = "0.4.3", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion src/gpu/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ where
pub fn create(priority: bool) -> GPUResult<FFTKernel<E>> {
let lock = locks::GPULock::lock();

let devices = opencl::Device::all()?;
let devices = opencl::Device::all();
if devices.is_empty() {
return Err(GPUError::Simple("No working GPUs found!"));
}
Expand Down
4 changes: 2 additions & 2 deletions src/gpu/multiexp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ where
pub fn create(priority: bool) -> GPUResult<MultiexpKernel<E>> {
let lock = locks::GPULock::lock();

let devices = opencl::Device::all()?;
let devices = opencl::Device::all();

let kernels: Vec<_> = devices
.into_iter()
.map(|d| (d.clone(), SingleMultiexpKernel::<E>::create(d, priority)))
.map(|d| (d, SingleMultiexpKernel::<E>::create(d.clone(), priority)))
.filter_map(|(device, res)| {
if let Err(ref e) = res {
error!(
Expand Down
2 changes: 1 addition & 1 deletion src/gpu/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub fn get_core_count(d: &opencl::Device) -> usize {
}

pub fn dump_device_list() {
for d in opencl::Device::all().unwrap() {
for d in opencl::Device::all() {
info!("Device: {:?}", d);
}
}
Expand Down

0 comments on commit cdd1d24

Please sign in to comment.