Skip to content

Conversation

@YanzhouTang
Copy link
Collaborator

Summary

This PR introduces a new pass AssignTaskTarget that operates at a higher abstraction level than existing partitioning mechanisms. It assigns hardware targets (CPU, CGRA, DOE) to compute functions before they are lowered to taskflow operations, enabling coarse-grained workload partitioning in heterogeneous computing systems.

Motivation

The existing PartitionTaskByTarget pass operates at the taskflow level (loop-to-CGRA mapping), which is fine-grained for certain use cases. We need a higher-level pass that can:

  1. Partition at function granularity: Assign entire computational functions to different hardware units
  2. Early hardware mapping: Make hardware decisions at the Linalg/func level before lowering to lower-level IRs
  3. Enable heterogeneous orchestration: Support scenarios where different components run on different hardware accelerators (Now we support NeRF algorithm)

Changes

New Pass: AssignTaskTarget

  • Location: lib/Conversion/AssignTaskTarget/
  • Functionality:
    • Analyzes function names and assigns target.device attributes
    • Supports CPU, CGRA, and DOE (Data Orchestration Engine) hardware targets
    • Uses pattern matching for initial implementation (extensible to more sophisticated analysis)
  • Usage: mlir-neura-opt --assign-task-target input.mlir

Example transformation:
// Before
func.func @hash_encoder_func(...) { ... }

// After
func.func @hash_encoder_func(...) attributes {target.device = "doe"} { ... }

@YanzhouTang YanzhouTang self-assigned this Jan 29, 2026
@YanzhouTang YanzhouTang added the enhancement New feature or request label Jan 29, 2026
@tancheng
Copy link
Contributor

what is the principle to determine which accelerator should be assigned to which kernel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants