-
Notifications
You must be signed in to change notification settings - Fork 74
Adds asNested TensorView operation #5684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Review updated until commit 5b99432 Description
|
| Relevant files | |||||
|---|---|---|---|---|---|
| Enhancement |
| ||||
| Tests |
|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 PR contains tests |
| ⚡ Recommended focus areas for review |
Implementation correctness
|
Test failures
-
(High, 95)
CUDA driver too old for runtime on dlcluster_h100 (nvFuser tests failing)Test Name H100 Source ArgsortParameterizedWithBlockAndBatch.SharedMemoryRequirement/1024_3_1_0 ❌ Link ArgsortParameterizedWithBlockAndBatch.SharedMemoryRequirement/512_2_0_1 ❌ Link ArgsortParameterizedWithBlockAndBatch.SharedMemoryRequirement/512_3_0_0 ❌ Link BlockSizeAndItemsPerThread/ArgSortComprehensiveTest.ComprehensiveValidation/BlockSize32_ItemsPerThread5 ❌ Link ClusterReductionTest.SimpleFusionNotAllReduce/cluster_15_dtype___bfloat ❌ Link ClusterReductionTest.SimpleFusionNotAllReduce/cluster_16_dtype___bfloat ❌ Link ClusterReductionTest.SimpleFusionNotAllReduce/cluster_4_dtype___bfloat ❌ Link ClusterReductionTest.SimpleFusionNotAllReduce/cluster_5_dtype___bfloat ❌ Link CombineMulSumAsMmaTestWithLayout.UseMatmulScheduler/TN ❌ Link General/HopperPlusMatmulSchedulerTest.FusedMultiplySum/KN_512_256_128_MmaMacro_m128_n128_k16_tma_store ❌ Link ... with 85 more test failures omitted. Check internal logs. -
(High, 16)
CUDA driver too old on dlcluster_h100 causing RNGTest failureTest Name H100 Source .thunder.tests.opinfos ❌ .thunder.tests.test_apex_cross_entropy_executor ❌ .thunder.tests.test_auto_register_torchops ❌ .thunder.tests.test_cudnn_executor ❌ .thunder.tests.test_einops ❌ .thunder.tests.test_grad ❌ .thunder.tests.test_nvfuser ❌ .thunder.tests.test_ops ❌ .thunder.tests.test_sdpaex_executor ❌ .thunder.tests.test_torch_compile_executor ❌ ... with 6 more test failures omitted. Check internal logs.
Greptile SummaryImplements the Key changes:
Implementation details:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant asNested
participant TensorDomain
participant RaggedIterDomain
participant IrBuilder
User->>asNested: asNested(data, extents, ragged_dim)
asNested->>asNested: Validate data != null
asNested->>asNested: Validate extents != null
asNested->>asNested: Validate extents is 1D
asNested->>TensorDomain: Get logical domain (noReductions)
TensorDomain-->>asNested: inp_logical
asNested->>asNested: Clone logical domain to root_domain
asNested->>asNested: wrapDim(ragged_dim, size) - validates bounds
asNested->>RaggedIterDomain: partition(root_domain[ragged_dim], extents)
RaggedIterDomain->>RaggedIterDomain: Validate input IterDomain
RaggedIterDomain->>RaggedIterDomain: Validate not already ragged
RaggedIterDomain->>RaggedIterDomain: Validate extents dtype is Index
RaggedIterDomain->>RaggedIterDomain: Create component_id and ragged_id
RaggedIterDomain-->>asNested: (component_id, ragged_id)
asNested->>asNested: Build logical_domain by replacing<br/>ragged_dim with (component, ragged)
asNested->>IrBuilder: create TensorDomain(root, logical, logical, contiguity)
IrBuilder-->>asNested: TensorDomain
asNested->>IrBuilder: create TensorView(domain, dtype)
IrBuilder-->>asNested: output TensorView
asNested->>IrBuilder: create LoadStoreOp(Set, out, data)
IrBuilder-->>asNested: LoadStoreOp (defines aliasing)
asNested-->>User: nested TensorView
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, no comments
|
!test |
|
!test |
This PR just adds
asNestedas a TensorView operation. It works like a reshape and produces an output tensor with an input IterDomain converted to a component IterDomain and a RaggedIterDomain by usingRaggedIterDomain::partition.