Module topology
Open SVGIndex calculation
Open SVGInput distribution
Open SVGFBGEMM lookup
Open SVGOutput distribution
Open SVGPostprocessing
Open SVGTorchRec kernel activities
仅保留 TorchRec forward 内的 activity;点击 Phase 可返回对应 sequence diagram。
| Phase | Activity/kernel | Logical op | Owner |
|---|---|---|---|
| Index calculation | permute_2D_lengths_kernel | KJT feature-order permute | ShardedEmbeddingCollection -> KeyedJaggedTensor |
| Index calculation | DeviceScanInitKernel | KJT feature-order permute | ShardedEmbeddingCollection -> KeyedJaggedTensor |
| Index calculation | DeviceScanKernel | KJT feature-order permute | ShardedEmbeddingCollection -> KeyedJaggedTensor |
| Index calculation | vectorized_elementwise_kernel | KJT feature-order permute | ShardedEmbeddingCollection -> KeyedJaggedTensor |
| Index calculation | DeviceScanInitKernel | KJT feature-order permute | ShardedEmbeddingCollection -> KeyedJaggedTensor |
| Index calculation | DeviceScanKernel | KJT feature-order permute | ShardedEmbeddingCollection -> KeyedJaggedTensor |
| Index calculation | permute_2D_data_kernel | KJT feature-order permute | ShardedEmbeddingCollection -> KeyedJaggedTensor |
| Index calculation | vectorized_elementwise_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceScanInitKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceScanKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | linearize_index_wo_infos_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | elementwise_kernel_with_index | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortHistogramKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortExclusiveSumKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemset | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceRadixSortOnesweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | adjacent_difference_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceScanInitKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceScanKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | scatter_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceCompactInitKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceSelectSweepKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | cudaMemcpyDeviceToHost | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | delinearize_unique_index_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | vectorized_elementwise_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | unique_indices_length_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | vectorized_elementwise_kernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceScanInitKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Index calculation | DeviceScanKernel | jagged_unique_indices (linearize/sort/unique/delinearize/reverse) | ShardedEmbeddingCollection._dedup_indices |
| Input distribution | vectorized_elementwise_kernel | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | DeviceScanInitKernel | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | DeviceScanKernel | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | _block_bucketize_sparse_features_cuda_kernel1 | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | DeviceScanInitKernel | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | DeviceScanKernel | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | _block_bucketize_sequence_sparse_features_cuda_kernel2 | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | reduce_kernel | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | cudaMemcpyDeviceToHost | row-wise block bucketize + output split sizes | RwSparseFeaturesDist |
| Input distribution | cudaMemcpyHostToDevice | KJT splits metadata staging + AllToAll | KJTAllToAll -> SplitsAllToAllAwaitable |
| Input distribution | cudaMemcpyHostToDevice | KJT splits metadata staging + AllToAll | KJTAllToAll -> SplitsAllToAllAwaitable |
| Input distribution | cudaMemcpyHostToDevice | KJT splits metadata staging + AllToAll | KJTAllToAll -> SplitsAllToAllAwaitable |
| Input distribution | CatArrayBatchedCopy | KJT splits metadata staging + AllToAll | KJTAllToAll -> SplitsAllToAllAwaitable |
| Input distribution | ncclDevKernel_SendRecv | KJT splits metadata staging + AllToAll | KJTAllToAll -> SplitsAllToAllAwaitable |
| Input distribution | cudaMemcpyDeviceToHost | wait splits; launch lengths and values AllToAll | KJTAllToAllSplitsAwaitable -> KJTAllToAllTensorsAwaitable |
| Input distribution | cudaMemcpyHostToDevice | wait splits; launch lengths and values AllToAll | KJTAllToAllSplitsAwaitable -> KJTAllToAllTensorsAwaitable |
| Input distribution | ncclDevKernel_SendRecv | wait splits; launch lengths and values AllToAll | KJTAllToAllSplitsAwaitable -> KJTAllToAllTensorsAwaitable |
| Input distribution | ncclDevKernel_SendRecv | wait splits; launch lengths and values AllToAll | KJTAllToAllSplitsAwaitable -> KJTAllToAllTensorsAwaitable |
| Input distribution | permute_2D_lengths_kernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | DeviceScanInitKernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | DeviceScanKernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | vectorized_elementwise_kernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | DeviceScanInitKernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | DeviceScanKernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | permute_2D_data_kernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | reduce_kernel | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| Input distribution | cudaMemcpyDeviceToHost | recat received KJT into feature-major order | KJTAllToAllTensorsAwaitable -> KeyedJaggedTensor.dist_init |
| FBGEMM lookup | vectorized_elementwise_kernel | TBE input offsets + bounds check | GroupedEmbeddingsLookup -> BatchedFusedEmbedding |
| FBGEMM lookup | DeviceScanInitKernel | TBE input offsets + bounds check | GroupedEmbeddingsLookup -> BatchedFusedEmbedding |
| FBGEMM lookup | DeviceScanKernel | TBE input offsets + bounds check | GroupedEmbeddingsLookup -> BatchedFusedEmbedding |
| FBGEMM lookup | vectorized_elementwise_kernel | TBE input offsets + bounds check | GroupedEmbeddingsLookup -> BatchedFusedEmbedding |
| FBGEMM lookup | bounds_check_indices_kernel_v1 | TBE input offsets + bounds check | GroupedEmbeddingsLookup -> BatchedFusedEmbedding |
| FBGEMM lookup | vectorized_elementwise_kernel | TBE input offsets + bounds check | GroupedEmbeddingsLookup -> BatchedFusedEmbedding |
| FBGEMM lookup | split_embedding_nobag_codegen_forward_unweighted_kernel | FBGEMM split_embedding_nobag forward | SplitTableBatchedEmbeddingBagsCodegen |
| Output distribution | invert_permute_kernel | forward recat inversion + split scaling | RwSequenceEmbeddingDist -> SequenceEmbeddingsAllToAll |
| Output distribution | vectorized_elementwise_kernel | forward recat inversion + split scaling | RwSequenceEmbeddingDist -> SequenceEmbeddingsAllToAll |
| Output distribution | vectorized_elementwise_kernel | forward recat inversion + split scaling | RwSequenceEmbeddingDist -> SequenceEmbeddingsAllToAll |
| Output distribution | permute_2D_lengths_kernel | permute embedding payload into destination-rank order | All2All_Seq_Req |
| Output distribution | DeviceScanInitKernel | permute embedding payload into destination-rank order | All2All_Seq_Req |
| Output distribution | DeviceScanKernel | permute embedding payload into destination-rank order | All2All_Seq_Req |
| Output distribution | vectorized_elementwise_kernel | permute embedding payload into destination-rank order | All2All_Seq_Req |
| Output distribution | DeviceScanInitKernel | permute embedding payload into destination-rank order | All2All_Seq_Req |
| Output distribution | DeviceScanKernel | permute embedding payload into destination-rank order | All2All_Seq_Req |
| Output distribution | permute_2D_data_kernel | permute embedding payload into destination-rank order | All2All_Seq_Req |
| Output distribution | vectorized_elementwise_kernel | qcomm FP16 encode (copy + clamp) | All2All_Seq_Req -> QuantizedCommCodec |
| Output distribution | vectorized_elementwise_kernel | qcomm FP16 encode (copy + clamp) | All2All_Seq_Req -> QuantizedCommCodec |
| Output distribution | ncclDevKernel_SendRecv | sequence embedding AllToAll | All2All_Seq_Req -> ProcessGroupNCCL |
| Postprocessing | unrolled_elementwise_kernel | qcomm FP16 decode after AllToAll wait | All2All_Seq_Req_Wait |
| Postprocessing | vectorized_gather_kernel | restore pre-bucketized unique-index order | SequenceEmbeddingsAwaitable |
| Postprocessing | unrolled_elementwise_kernel | materialize reverse_indices in index dtype | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |
| Postprocessing | vectorized_gather_kernel | restore original duplicate positions with reverse_indices | EmbeddingCollectionAwaitable -> construct_jagged_tensors |