Skip to content

[ROCm] Profiler misses copy kernel records across sessions in one process #200903

Closed

Description

@pablo-garay

🐛 Describe the bug

On ROCm, torch.profiler.profile(activities=[ProfilerActivity.CUDA]) around a single dst.copy_(src) sometimes reports no record for the copy kernel even though it ran. Once a process starts missing it, later profiler sessions in the same process keep missing it; a fresh process sees it again.

This is what makes the copy-kernel dispatch tests in test/test_torch.py (test_copy_strided_chunk*, test_copy_transpose_tiled*) flaky on ROCm. The flaky bot has disabled 13 variants so far: #200246, #199996, #200382, #199890, #199910, #200383, #200400, #200401, #199997, #199016, #198911, #199891, #199893.

Example: job 114884413906 (MI300, default), test_copy_strided_chunk_alignment_cuda_uint8: one check saw maybe_strided_chunk_copy, then the next three profiled sessions in that process missed it (Booleans mismatch: False is not True), and the first fresh-process rerun repeated the pattern.

Possibly related open PRs: #199973 (RocprofLogger teardown, rocprofiler-sdk return codes) and #200296 (kernel dims from dispatch records; runtime fill/copy kernels reported as memset/memcpy). If #200296 reports these copies as memcpy, the tests' kernel-name check would need updating too.

Versions

ROCm CI, MI300 default config, main as of 2026-10-12.

Agent details

An agent helped collect the disabled-test list and draft this description; I reviewed it. The per-process trace above is from @jeffdaily's review on #200694.

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise @mwootton @divyanshk @jiannanWang @scotts @ryanzhang22

Activity

  1. added
    module: rocm
    on Oct 14, 2026
  2. added
    oncall: profiler
    bot-triaged
    on Oct 14, 2026
  3. naromero77amd commented on Oct 15, 2026

    @naromero77amd
    Collaborator

    @mwootton Please take a look when you get a chance.

  4. added a commit that references this issue on Oct 30, 2026
    b0e48e7
  5. added 2 commits that reference this issue on Nov 5, 2026
    2bcd466
    294698e
  6. self-assigned this
    on Dec 1, 2026
  7. naromero77amd commented on Dec 1, 2026

    @naromero77amd
    Collaborator

    This was fixed by @mwootton

  8. added a commit that references this issue on Dec 3, 2026
    7a25c36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bot-triagedmodule: rocmoncall: profiler

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions