rocblas.cpp 520 Bytes
Newer Older
Paul's avatar
Paul committed
1
#include <migraph/gpu/rocblas.hpp>
2
3

namespace migraph {
4
inline namespace MIGRAPH_INLINE_NS {
Paul's avatar
Paul committed
5
namespace gpu {
6
7
8
9
10
11
12
13

rocblas_handle_ptr create_rocblas_handle_ptr()
{
    rocblas_handle handle;
    rocblas_create_handle(&handle);
    return rocblas_handle_ptr{handle};
}

Paul's avatar
Paul committed
14
15
16
17
18
19
20
rocblas_handle_ptr create_rocblas_handle_ptr(hipStream_t s)
{
    rocblas_handle_ptr rb = create_rocblas_handle_ptr();
    rocblas_set_stream(rb.get(), s);
    return rb;
}

Paul's avatar
Paul committed
21
} // namespace gpu
22
} // inline namespace MIGRAPH_INLINE_NS
23
} // namespace migraph