Add Torch FP16 inference support - #50790
Conversation
|
type ngt |
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50790/49102
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50790/49111
|
|
Pull request #50790 was updated. |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50790/49113
|
|
Pull request #50790 was updated. |
52610e0 to
bb6fbfb
Compare
|
allow @EmanueleCoradin test rights |
|
@cmsbuild, please test |
|
-1 Failed Tests: RelVals-AMD_W7900 Failed RelVals-AMD_W7900The relvals timed out after 4 hours. Comparison SummarySummary:
AMD_MI300X Comparison SummaryThere are some workflows for which there are errors in the baseline: Summary:
NVIDIA_H100 Comparison SummarySummary:
NVIDIA_L40S Comparison SummarySummary:
|
|
This time the failure looks unrelated |
|
@cmsbuild, please test |
|
-1 Failed Tests: RelVals-AMD_MI300X Failed RelVals-AMD_MI300XThe relvals timed out after 4 hours. Comparison SummarySummary:
AMD_W7900 Comparison SummarySummary:
NVIDIA_H100 Comparison SummarySummary:
NVIDIA_L40S Comparison SummarySummary:
|
|
@cmsbuild, please test |
|
+1 Size: This PR adds an extra 16KB to repository Comparison SummarySummary:
AMD_MI300X Comparison SummarySummary:
AMD_W7900 Comparison SummaryThere are some workflows for which there are errors in the baseline: Summary:
NVIDIA_H100 Comparison SummarySummary:
NVIDIA_L40S Comparison SummarySummary:
|
|
Everything should be in order now. |
|
@EmanueleCoradin , following the issue #50923 , i created #50927 to fix the failign unit test. I see that this PR also fixes the failing unit test. About the change in #50783 (auto_freeze), I have proposed/asked (in #50927) |
|
@smuzaffar , thanks for the information. I reply to the proposal in #50927 👍 |
|
@EmanueleCoradin this branch has conflicts that must be resolved. |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50790/49390 ERROR: Build errors found during clang-tidy run. |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50790/49391 |
|
@cmsbuild, please test |
|
+1 Size: This PR adds an extra 20KB to repository Comparison SummarySummary:
AMD_MI300X Comparison SummaryThere are some workflows for which there are errors in the baseline: Summary:
AMD_W7900 Comparison SummarySummary:
NVIDIA_H100 Comparison SummarySummary:
NVIDIA_L40S Comparison SummarySummary:
|
|
@cmsbuild, please test |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50790/49425 |
|
+1 Size: This PR adds an extra 20KB to repository Comparison SummarySummary:
AMD_MI300X Comparison SummaryThere are some workflows for which there are errors in the baseline: Summary:
AMD_W7900 Comparison SummarySummary:
NVIDIA_H100 Comparison SummarySummary:
NVIDIA_L40S Comparison SummarySummary:
|
|
+1 |
|
@cms-sw/ml-l2 kind ping. |
|
+ml |
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @mandrenguyen, @sextonkennedy, @ftenchini (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
This PR results from a work in collaboration with @valsdav.
PR description:
This PR introduces FP16 (half precision) inference support in the PyTorch Alpaka pipeline, alongside the existing FP32 execution path.
FP16 results are expected to be close to FP32, but not identical due to reduced precision.
Runtime FP16 conversion
Input data is stored in SoA format with full FP32 precision.
Conversion to FP16 happens at inference time via the PyTorch API, enabled by passing torch::kHalf to model.forward(...).
PR Validation
A small inspection module has been extended to compare FP32 and runtime FP16 outputs.
The module checks that the relative difference between FP32 and FP16 output is less then 1%.
They can be run by:
cd PhysicsTools/PyTorchAlpakaTest/test cmsRun runPyTorchAlpakaTest.py -e 3