Skip to content

【Hackathon 10th Spring No.45】FastDeploy 支持在 T4/V100 硬件的编译#6488

Open
playaswd wants to merge 4 commits intoPaddlePaddle:developfrom
playaswd:PH10No45-T4V100
Open

【Hackathon 10th Spring No.45】FastDeploy 支持在 T4/V100 硬件的编译#6488
playaswd wants to merge 4 commits intoPaddlePaddle:developfrom
playaswd:PH10No45-T4V100

Conversation

@playaswd
Copy link
Contributor

@playaswd playaswd commented Feb 23, 2026

Motivation

Support FastDeploy compilation on NVIDIA T4/V100 (SM75/SM70) and fix CI startup compatibility when Paddle does not expose paddle.compat.

Modifications

  • Update custom_ops/setup_ops.py to gate architecture-specific CUDA sources/macros and deduplicate source entries.
  • Update custom_ops/gpu_ops/cpp_extensions.cc to register/export SM-specific ops with compile-time guards.
  • Update fastdeploy/__init__.py to enable torch-proxy compatibility in a version-safe way:
    • prefer paddle.enable_compat(scope={"triton"})
    • fallback to paddle.compat.enable_torch_proxy(scope={"triton"})
    • otherwise skip with warning.

Usage or Command

# Build
python -m pip install -U pybind11 pybind11-global
MAX_JOBS=8 python setup.py bdist_wheel

# Install
python -m pip install -U dist/fastdeploy_gpu-*.whl

# Verify
python -c "import fastdeploy; print(fastdeploy.__file__)"
python -m pip show fastdeploy-gpu

Accuracy Tests

  • This PR does not change model forward numerical logic.
  • It changes build/source selection and import-time compatibility guards only.
  • Build and install were verified on SM86/SM75/SM70 environments; the HPU CI error path (paddle.compat missing) is addressed by compatibility fallback.

Checklist

  • PR description sections are complete and non-empty.
  • Formatting checks (pre-commit) passed for modified files.
  • A new commit has been pushed and CI can be re-run on the latest head.

@paddle-bot
Copy link

paddle-bot bot commented Feb 23, 2026

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Feb 23, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@ddb06ff). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #6488   +/-   ##
==========================================
  Coverage           ?   71.75%           
==========================================
  Files              ?      394           
  Lines              ?    53963           
  Branches           ?     8469           
==========================================
  Hits               ?    38721           
  Misses             ?    12456           
  Partials           ?     2786           
Flag Coverage Δ
GPU 71.75% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants