Skip to content

Source builds need workarounds for sdist, CUDA arches, non-x86 CPU dispatch, and setup.py hardcoding #2082

Description

@RemiArata

Building CTranslate2 from source currently needs multiple downstream workarounds. Core upstream issues:

  1. No PyPI sdist (highest impact)
    CTranslate2 publishes wheels but not source distributions, which forces custom source-resolution logic.
    Ask: Publish sdists to PyPI.

  2. Deprecated FindCUDA path breaks Blackwell arch handling (related: Feature request: CUDA 13 support #1933)
    Current FindCUDA/select_compute_arch.cmake behavior drops newer multi-digit CUDA arch majors, requiring manual -gencode fixes.
    Ask: Migrate to FindCUDAToolkit + CMAKE_CUDA_ARCHITECTURES.

  3. ENABLE_CPU_DISPATCH breaks on unsupported non-x86/non-arm64 arches
    CPU_ISA_DISPATCH is undefined on targets like ppc64le/s390x.
    Ask: Add support or gracefully disable/fallback on unsupported arches.

  4. setup.py hardcodes absolute rpaths (related context: Clang unusual switches wrongly hardcoded in resulting setup.py #1704)
    Absolute paths reduce wheel relocatability.
    Ask: Use $ORIGIN-relative rpaths by default.

  5. setup.py hardcodes GCC-specific flags (related: Clang unusual switches wrongly hardcoded in resulting setup.py #1704)
    Flags like -fvisibility=hidden and -fno-openmp-implicit-rpath can fail on clang/amdclang.
    Ask: Gate flags by compiler/toolchain detection.

These fixes would significantly improve portability and reduce downstream patching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions