Skip to content

Commit 0c692ca

Browse files
committed
upgrade deps
1 parent c079907 commit 0c692ca

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "rust-gpu-tools"
3-
version = "0.7.2"
3+
version = "0.8.0"
44
authors = ["Keyvan Kambakhsh <[email protected]>", "porcuquine <[email protected]>"]
55
description = "Rust OpenCL tools"
66
edition = "2021"
77
homepage = "https://github.com/filecoin-project/rust-gpu-tools"
88
license = "MIT/Apache-2.0"
99
repository = "https://github.com/filecoin-project/rust-gpu-tools"
10-
rust-version = "1.70.0"
10+
rust-version = "1.81.0"
1111

1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1313
[features]
@@ -18,11 +18,11 @@ cuda = ["rustacuda"]
1818
[dependencies]
1919
home = "0.5"
2020
sha2 = "0.10"
21-
thiserror = "1.0.10"
22-
log = "0.4.11"
21+
thiserror = "2.0.12"
22+
log = "0.4.26"
2323
hex = "0.4.3"
2424

25-
opencl3 = { version = "0.9.3", default-features = false, features = ["CL_VERSION_1_2"], optional = true }
25+
opencl3 = { version = "0.11.0", default-features = false, features = ["CL_VERSION_1_2"], optional = true }
2626
rustacuda = { package = "fil-rustacuda", version = "0.1.3", optional = true }
2727
once_cell = "1.8.0"
2828
temp-env = "0.3.3"

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.70.0
1+
1.81.0

src/error.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ use rustacuda::error::CudaError;
99
pub enum GPUError {
1010
/// Error from the underlying `opencl3` library, e.g. a memory allocation failure.
1111
#[cfg(feature = "opencl")]
12-
#[error("Opencl3 Error: {0}{}", match .1 {
12+
#[error("Opencl3 Error: {0}{}", match .message {
1313
Some(message) => format!(" {}", message),
1414
None => "".to_string(),
1515
})]
16-
Opencl3(ClError, Option<String>),
16+
Opencl3 {
17+
/// The error code.
18+
error: ClError,
19+
/// The error message.
20+
message: Option<String>,
21+
},
1722

1823
/// Error for OpenCL `clGetProgramInfo()` call failures.
1924
#[cfg(feature = "opencl")]
@@ -63,6 +68,9 @@ pub type GPUResult<T> = std::result::Result<T, GPUError>;
6368
#[cfg(feature = "opencl")]
6469
impl From<ClError> for GPUError {
6570
fn from(error: ClError) -> Self {
66-
GPUError::Opencl3(error, None)
71+
GPUError::Opencl3 {
72+
error,
73+
message: None,
74+
}
6775
}
6876
}

src/opencl/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl Program {
152152
let mut program = opencl3::program::Program::create_from_source(&context, src)?;
153153
if let Err(build_error) = program.build(context.devices(), "") {
154154
let log = program.get_build_log(context.devices()[0])?;
155-
return Err(GPUError::Opencl3(build_error, Some(log)));
155+
return Err(GPUError::Opencl3 { error: build_error, message: Some(log) });
156156
}
157157
debug!(
158158
"Building kernel ({}) from source: done.",
@@ -191,7 +191,7 @@ impl Program {
191191
}?;
192192
if let Err(build_error) = program.build(context.devices(), "") {
193193
let log = program.get_build_log(context.devices()[0])?;
194-
return Err(GPUError::Opencl3(build_error, Some(log)));
194+
return Err(GPUError::Opencl3 { error: build_error, message: Some(log) });
195195
}
196196
let queue = CommandQueue::create_default(&context, 0)?;
197197
let kernels = opencl3::kernel::create_program_kernels(&program)?;

0 commit comments

Comments
 (0)