Fix all ROCm 6.2 hipBLAS API incompatibilities
ROCm 6.2 hipblasGemmEx uses hipblasDatatype_t for the compute type arg, not hipblasComputeType_t (that came in ROCm 7). Map compute type and HIPBLAS_COMPUTE_* constants down to the old hipblasDatatype_t/HIPBLAS_R_* equivalents. Also fix HIPBLAS_R_16B (not 16BF) and add rocrand-dev. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
git cmake cmake-curses-gui \
|
git cmake cmake-curses-gui \
|
||||||
libopenblas-dev wget \
|
libopenblas-dev wget \
|
||||||
python3-dev python3-pip \
|
python3-dev python3-pip \
|
||||||
hipblas-dev miopen-hip-dev rocthrust-dev hiprand-dev hipcub-dev \
|
hipblas-dev miopen-hip-dev rocthrust-dev hiprand-dev hipcub-dev rocrand-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Build oneDNN as a static library (CPU fallback / conv ops)
|
# Build oneDNN as a static library (CPU fallback / conv ops)
|
||||||
@@ -42,11 +42,17 @@ RUN git clone --branch v4.0.0 --depth 1 \
|
|||||||
git apply /tmp/ct2_4.0.0_rocm.patch && \
|
git apply /tmp/ct2_4.0.0_rocm.patch && \
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's/hipDataType/hipblasDatatype_t/g' \
|
-e 's/hipDataType/hipblasDatatype_t/g' \
|
||||||
|
-e 's/hipblasComputeType_t/hipblasDatatype_t/g' \
|
||||||
-e 's/HIP_R_16F/HIPBLAS_R_16F/g' \
|
-e 's/HIP_R_16F/HIPBLAS_R_16F/g' \
|
||||||
-e 's/HIP_R_32F/HIPBLAS_R_32F/g' \
|
-e 's/HIP_R_32F/HIPBLAS_R_32F/g' \
|
||||||
-e 's/HIP_R_16BF/HIPBLAS_R_16BF/g' \
|
-e 's/HIP_R_16BF/HIPBLAS_R_16B/g' \
|
||||||
-e 's/HIP_R_32I/HIPBLAS_R_32I/g' \
|
-e 's/HIP_R_32I/HIPBLAS_R_32I/g' \
|
||||||
-e 's/HIP_R_8I/HIPBLAS_R_8I/g' \
|
-e 's/HIP_R_8I/HIPBLAS_R_8I/g' \
|
||||||
|
-e 's/HIPBLAS_COMPUTE_16F/HIPBLAS_R_16F/g' \
|
||||||
|
-e 's/HIPBLAS_COMPUTE_32F_FAST_16BF/HIPBLAS_R_32F/g' \
|
||||||
|
-e 's/HIPBLAS_COMPUTE_32F_FAST_16F/HIPBLAS_R_32F/g' \
|
||||||
|
-e 's/HIPBLAS_COMPUTE_32F/HIPBLAS_R_32F/g' \
|
||||||
|
-e 's/HIPBLAS_COMPUTE_32I/HIPBLAS_R_32I/g' \
|
||||||
src/cuda2hip_macros.hpp && \
|
src/cuda2hip_macros.hpp && \
|
||||||
mkdir build && cd build && \
|
mkdir build && cd build && \
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=${CTRANSLATE2_ROOT} \
|
cmake -DCMAKE_INSTALL_PREFIX=${CTRANSLATE2_ROOT} \
|
||||||
|
|||||||
Reference in New Issue
Block a user