Skip to content

Conversation

@qedawkins
Copy link
Contributor

Adds the ConvertSRefToMemRefPass which converts pcf.sref types to memrefs.

The pass performs layout propagation analysis using DFX to determine the most specific memref layout for each sref value based on how it's produced and used. It then converts:

  • pcf.alloc to memref.alloc
  • pcf.write_slice to memref.subview + store operations
  • pcf.read_slice to memref.subview + load operations
  • pcf.get_memref to memref.subview with layout casts
  • pcf.generic/loop result types from tensor to memref

Function signatures are updated to use memref types instead of sref types, with proper layout inference from call sites.

Also adds loadSRefLoweringDependentDialects to
PCFConversionDialectInterface, allowing external dialects to register dependent dialects needed during sref conversion.

Adds the ConvertSRefToMemRefPass which converts pcf.sref types to
their concrete memref equivalents.

The pass performs layout propagation analysis using DFX to determine
the most specific memref layout for each sref value based on how it's
produced and used. It then converts:
- pcf.alloc to memref.alloc
- pcf.write_slice to memref.subview + store operations
- pcf.read_slice to memref.subview + load operations
- pcf.get_memref to memref.subview with layout casts
- pcf.generic/loop result types from tensor to memref

Function signatures are updated to use memref types instead of sref
types, with proper layout inference from call sites.

Also adds loadSRefLoweringDependentDialects to
PCFConversionDialectInterface, allowing external dialects to register
dependent dialects needed during sref conversion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants