Skip to content

Fix ROCm compatibility for HIPBLAS and Thrust includes#17

Open
vinayakv22 wants to merge 1 commit into
arlo-phoenix:rocmfrom
vinayakv22:rocm
Open

Fix ROCm compatibility for HIPBLAS and Thrust includes#17
vinayakv22 wants to merge 1 commit into
arlo-phoenix:rocmfrom
vinayakv22:rocm

Conversation

@vinayakv22
Copy link
Copy Markdown

This PR fixes ROCm build issues observed when compiling on gfx1031 (RX 6800M).

Changes

  • Fix HIPBLAS symbol mapping by removing unsupported _v2 aliases:
    • cublasGemmEx -> hipblasGemmEx
    • cublasGemmStridedBatchedEx -> hipblasGemmStridedBatchedEx
  • Add missing Thrust headers used by CUDA/HIP codepaths:
    • thrust/reduce.h, thrust/extrema.h
    • thrust/iterator/counting_iterator.h
    • iterator headers in helpers.h and gumbel_max_gpu.cu

Result

  • libctranslate2.so now builds successfully on ROCm in this environment.
  • Build still reports an unrelated CLI compile issue (cxxopts missing uint8_t include), but core library target is successful.

- Remove _v2 suffix from hipBLAS functions (hipblasGemmEx, hipblasGemmStridedBatchedEx)
- Add missing Thrust headers for iterators and algorithms
- Use thrust namespace (which ROCm maps to rocprim internally) instead of direct rocprim calls

Successfully builds libctranslate2.so with ROCm support for gfx1031 (RX 6800M).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant