Skip to content

Commit

Permalink
Fix previous commits
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Oct 30, 2023
1 parent 162a0a1 commit 9dbe648
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions examples/devblas_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ inline const hipblasHandle_t& hipblas_handle(T _ = 0) {
device = d;
}

cudaStream_t stream = ttg::device::current_stream();
hipStream_t stream = ttg::device::current_stream();

map_type::iterator it;
if ((it = handles.find({device, stream})) == handles.end()){
Expand All @@ -108,7 +108,7 @@ inline const hipblasHandle_t& hipblas_handle(T _ = 0) {
if (HIPBLAS_STATUS_SUCCESS != status) {
throw std::runtime_error("hipblasCreate failed");
}
hipblasStatus_t status = hipblasSetStream(handle, stream);
status = hipblasSetStream(handle, stream);
if (HIPBLAS_STATUS_SUCCESS != status) {
throw std::runtime_error("hipblasSetStream failed");
}
Expand All @@ -131,7 +131,7 @@ inline const hipsolverDnHandle_t& hipsolver_handle(T _ = 0) {
device = d;
}

cudaStream_t stream = ttg::device::current_stream();
hipStream_t stream = ttg::device::current_stream();

std::map<int, hipsolverDnHandle_t>::iterator it;
if ((it = handles.find({device, stream})) == handles.end()){
Expand All @@ -140,7 +140,7 @@ inline const hipsolverDnHandle_t& hipsolver_handle(T _ = 0) {
if (HIPSOLVER_STATUS_SUCCESS != status) {
throw std::runtime_error("hipsolverCreate failed");
}
hipsolverStatus_t status = hipsolverDnSetStream(handle, stream);
status = hipsolverDnSetStream(handle, stream);
if (HIPSOLVER_STATUS_SUCCESS != status) {
throw std::runtime_error("hipsolverSetStream failed");
}
Expand Down
2 changes: 1 addition & 1 deletion examples/matrixtile.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class MatrixTile : public ttg::TTValue<MatrixTile<T, Allocator>> {
* set by application and is not computed automatically. */
T norm() const {
if (!_norm) _norm = blas::nrm2(size(), data(), 1);
return _norm;
return _norm.value();
}

void set_norm(T norm) {
Expand Down

0 comments on commit 9dbe648

Please sign in to comment.