diff --git a/examples/devblas_helper.h b/examples/devblas_helper.h index d9a3a37ea..f93e3799a 100644 --- a/examples/devblas_helper.h +++ b/examples/devblas_helper.h @@ -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()){ @@ -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"); } @@ -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::iterator it; if ((it = handles.find({device, stream})) == handles.end()){ @@ -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"); } diff --git a/examples/matrixtile.h b/examples/matrixtile.h index bbacc64df..21bfa5aa6 100644 --- a/examples/matrixtile.h +++ b/examples/matrixtile.h @@ -133,7 +133,7 @@ class MatrixTile : public ttg::TTValue> { * 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) {