Skip to content

[BUG] Cutlass Python DSL: could not get source code #2636

@LRlr239

Description

@LRlr239

Which component has the problem?

CuTe DSL

Bug Report

Describe the bug

import cutlass
import cutlass.cute as cute


@cute.jit
def add_demo_02():
   a = cutlass.Int32(1)
   b = cutlass.Int32(2)
   cute.printf("a + b = {}", a + b)

add_demo_02()

got following Error:

>>> import cutlass.cute as cute
>>> 
>>> 
>>> @cute.jit
... def add_demo_02():
...    a = cutlass.Int32(1)
...    b = cutlass.Int32(2)
...    cute.printf("a + b = {}", a + b)
... 
>>> add_demo_02()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.12/inspect.py", line 1260, in getsourcelines
    lines, lnum = findsource(object)
                  ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/inspect.py", line 1089, in findsource
    raise OSError('could not get source code')
OSError: could not get source code

Steps/Code to reproduce bug

  1. open a python shell / jupyter
  2. paste the code above

Expected behavior
A clear and concise description of what you expected to happen.

Environment details (please complete the following information):

  • python 3.12.3 main
  • cuda V12.9.86
  • nvidia-cutlass-dsl 4.1.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions