[QST] [CuTeDSL] Object aliasing breaks inside `cutlass.range`
Open
Nobody has claimed this yet.
? - Needs Triage
inactive-30d
inactive-90d
question
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
What is your question?
Hi, I noticed that when using dynamic range, object aliasing seems to break if inplace operations are performed. Is this expected?
Sample code:
import cutlass
import cutlass.cute as cute
@cute.jit
def f():
state0 = cutlass.pipeline.make_pipeline_state(cutlass.pipeline.PipelineUserType.Producer, stages=2)
state1 = state0
print(state1 is state0)
state0.advance()
print(state1 is state0) # -> True
state0.advance()
print(state1 is state0) # -> True
state0.advance()
print(state1 is state0) # -> True
for i in cutlass.range_constexpr(3):
state0.advance()
print(state1 is state0) # --> True
print(state1 is state0) # --> True
print("--- Here! ---")
for i in cutlass.range(3):
state0.advance()
print(state1 is state0) # --> False!
print(state1 is state0) # --> False!
f()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the supplied Python sample with CuTeDSL and compare the aliasing behavior of cutlass.range_constexpr with cutlass.range. Trace the dynamic-range handling and determine whether preserving object aliasing is expected; done means the behavior is clarified and, if it is a bug, covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100