Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

ROCm BLAS marshalling library

License

NotificationsYou must be signed in to change notification settings

ROCm/hipBLAS

Repository files navigation

hipBLAS is a Basic Linear Algebra Subprograms (BLAS) marshalling library with multiple supportedbackends. It sits between your application and a 'worker' BLAS library, where it marshals inputs to thebackend library and marshals results to your application. hipBLAS exports an interface that doesn'trequire the client to change, regardless of the chosen backend. Currently, hipBLAS supports rocBLASand cuBLAS backends.

To use hipBLAS, you must first install rocBLAS, rocSPARSE, and rocSOLVER or cuBLAS.

Documentation

Note

The published hipBLAS documentation is available athipBLAS in an organized, easy-to-read format, with search and a table of contents. The documentation source files reside in the hipBLAS/docs folder of this repository. As with all ROCm projects, the documentation is open source. For more information, seeContribute to ROCm documentation.

To build our documentation locally, use the following code:

cd docspip3 install -r sphinx/requirements.txtpython3 -m sphinx -T -E -b html -d _build/doctrees -D language=en. _build/html

Alternatively, build with CMake:

cmake -DBUILD_DOCS=ON ...

Build and install

  1. Download the hipBLAS source code (clone this repository):

        git clone https://github.com/ROCmSoftwarePlatform/hipBLAS.git
        hipBLAS requires specific versions of rocBLAS and rocSOLVER. Refer to    [CMakeLists.txt](https://github.com/ROCmSoftwarePlatform/hipBLAS/blob/develop/library/CMakeLists.txt)    for details.
  2. Build hipBLAS and install it into/opt/rocm/hipblas:

    cd hipblas    ./install.sh -i

Interface examples

The hipBLAS interface is compatible with rocBLAS and cuBLAS-v2 APIs. Porting a CUDA applicationthat originally calls the cuBLAS API to an application that calls the hipBLAS API is relativelystraightforward. For example, the hipBLAS SGEMV interface is:

GEMV API

hipblasStatus_thipblasSgemv(hipblasHandle_thandle,hipblasOperation_ttrans,intm,intn,constfloat*alpha,constfloat*A,intlda,constfloat*x,intincx,constfloat*beta,float*y,intincy );

Batched and strided GEMM API

hipBLAS GEMM can process matrices in batches with regular strides by using the strided-batchedversion of the API:

hipblasStatus_thipblasSgemmStridedBatched(hipblasHandle_thandle,hipblasOperation_ttransa,hipblasOperation_ttransb,intm,intn,intk,constfloat*alpha,constfloat*A,intlda,long longbsa,constfloat*B,intldb,long longbsb,constfloat*beta,float*C,intldc,long longbsc,intbatchCount);

hipBLAS assumes matrix A and vectors x, y are allocated in GPU memory space filled with data. Youare responsible for copying data to and from the host and device memory.


[8]ページ先頭

©2009-2025 Movatter.jp