Skip to content

Fix DLRM profiler argument passing - #2699

Open
kiwigitops wants to merge 1 commit into
pytorch:mainfrom
kiwigitops:fix/dlrm-profiler-use-device
Open

Fix DLRM profiler argument passing#2699
kiwigitops wants to merge 1 commit into
pytorch:mainfrom
kiwigitops:fix/dlrm-profiler-use-device

Conversation

@kiwigitops

Copy link
Copy Markdown

Summary

  • pass the profiler device selection by keyword because profiler options after enabled are keyword-only
  • select cuda when the DLRM run is using a GPU and None for CPU runs
  • preserve the existing disabled-profiling behavior while avoiding the startup TypeError

Fixes #2589

Validation

  • Reproduced the original profile.__init__() positional-argument failure on current main with PyTorch 2.13.0
  • Ran the issue's random-data CPU path after the change and completed all three training iterations
  • Repeated with --enable-profiling; the run completed and produced nonempty profiler table and Chrome trace files
  • Parsed the Chrome trace and verified traceEvents, schemaVersion, and deviceProperties
  • python3 -m py_compile torchbenchmark/models/dlrm/dlrm_s_pytorch.py
  • git diff --check

@meta-cla meta-cla Bot added the cla signed label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dlrm_s_pytorch.py profile api arguments mismatch

1 participant