port-to-layout-api

Port FlyDSL GPU kernels from raw buffer_ops to the layout API.

260|104|Updated Nov 23, 2025
One-click install
npx skills add https://github.com/ROCm/FlyDSL --skill port-to-layout-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: port-to-layout-api
Source: https://github.com/ROCm/FlyDSL/tree/main/.claude/skills/port-to-layout-api
Command: npx skills add https://github.com/ROCm/FlyDSL --skill port-to-layout-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Port raw buffer_ops to the higher-level layout API, enabling more readable, maintainable, and optimizer-friendly kernels.

Core Features & Use Cases

  • Porting raw buffer_ops like create_buffer_resource, buffer_load, and buffer_store to fx.rocdl.make_buffer_tensor and BufferCopy-based flows.
  • Handling multi-dimensional tensors with slices, logical divisions, and copy atoms to support 2D/3D layouts.
  • Encouraging safer, more consistent kernel porting with masking guidance and OOB guards.

Quick Start

Run the port-to-layout-api tool on a kernel file to migrate raw buffer_ops usage to the layout API.

Frequently Asked Questions about port-to-layout-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate FlyDSL GPU kernels from raw buffer_ops to the layout API?

To migrate FlyDSL GPU kernels from raw buffer_ops to the layout API, port manual byte-offset arithmetic to fx.rocdl.make_buffer_tensor, slice, and BufferCopy atoms. This enables more readable, maintainable, and optimizer-friendly kernel code.

What is the best way to handle non-contiguous accesses when porting to the FlyDSL layout API?

Handling non-contiguous accesses during FlyDSL layout API porting involves using slices and logical divisions. The process guides migration to make_buffer_tensor and copy atoms, specifically supporting 2D and 3D tensor layouts.

How do I replace create_buffer_resource and buffer_load with the FlyDSL layout API?

Replace raw buffer_ops like create_buffer_resource, buffer_load, and buffer_store with fx.rocdl.make_buffer_tensor and BufferCopy-based flows. This transition shifts raw buffer operations to higher-level layout abstractions.

Does the FlyDSL layout API provide guidance for masking and OOB guards during buffer_ops porting?

Yes, porting buffer_ops to the FlyDSL layout API includes explicit masking guidance and OOB guards. This ensures safer, more consistent kernel porting when replacing manual byte-offset arithmetic with slice operations.

Can I use BufferCopy atoms for 2D and 3D tensor layouts in FlyDSL?

Yes, you can use fx.make_copy_atom and BufferCopy variants for 2D and 3D tensor layouts in FlyDSL. The layout API handles multi-dimensional tensors via slices and logical divisions to support complex layouts.