Skip to content

Commit

Permalink
feat/cublas: log exit code of operations
Browse files Browse the repository at this point in the history
  • Loading branch information
drahnr committed Apr 9, 2020
1 parent d409d44 commit 360bf19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions coaster-blas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ license = "MIT OR Apache-2.0"
[dependencies]
coaster = { version = "0.1", path = "../coaster", default-features = false }
lazy_static = "1"
log = "0.4"

# native
rust-blas = { version = "^0.1", path = "../rust-blas", optional = true }
# cuda
Expand Down
8 changes: 6 additions & 2 deletions coaster-blas/src/frameworks/cuda/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ macro_rules! trans {
macro_rules! exec {
($name:ident, $f:expr) => ({
let res = $f;
res.map_err(|_| PluginError::Operation(
stringify!(Unable to execute operation $name)).into())
res.map_err(|e| {
log::debug!("Unable to execute operation {}: {:?}", stringify!($name), e);
PluginError::Operation(
stringify!(Unable to execute operation $name)
).into()
})
})
}

Expand Down

0 comments on commit 360bf19

Please sign in to comment.