Skip to content

[Issue] torch.compile fails with FlyDSL kernels #596

@amd-cgilli

Description

@amd-cgilli

Summary

torch.compile(fullgraph=True) doesn't work with FlyDSL compiled kernels.

Two distinct failure modes are reproduced:

  1. Compiling the kernel inside torch.compile
  2. Calling a pre-compiled kernel inside torch.compile

System configuration

  • GPU: MI355X
  • OS: Ubuntu 24.04
  • PyTorch: 2.10.0+rocm7.2.2.git40d237bf

Repro

Code available here.

Both scripts work correctly in eager mode and only fail at the torch.compile step.

Case 1: compilation inside torch.compile

FLYDSL_RUNTIME_ENABLE_CACHE=0 python tests/kernels/test_gemm_torch_compile.py 

Case 2: invocation of pre-compiled kernel inside torch.compile

FLYDSL_RUNTIME_ENABLE_CACHE=0 python tests/kernels/test_gemm_torch_compile_wrapper.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions