Skip to content

[mlir][dxsa] Add topology instructions#198

Open
dzhidzhoev wants to merge 5 commits into
dxsa-mlirfrom
users/dzhidzhoev/mlir/emitcut
Open

[mlir][dxsa] Add topology instructions#198
dzhidzhoev wants to merge 5 commits into
dxsa-mlirfrom
users/dzhidzhoev/mlir/emitcut

Conversation

@dzhidzhoev

Copy link
Copy Markdown
Contributor

Example:
dxsa.cut
dxsa.emit
dxsa.emit_then_cut
dxsa.emit_stream 1
dxsa.cut_stream 3
dxsa.emit_then_cut_stream 2

Example:
dxsa.cut
dxsa.emit
dxsa.emit_then_cut
dxsa.emit_stream 1
dxsa.cut_stream 3
dxsa.emit_then_cut_stream 2
@dzhidzhoev dzhidzhoev force-pushed the users/dzhidzhoev/mlir/emitcut branch from 73b0263 to 2c32aeb Compare June 24, 2026 21:06
dzhidzhoev added a commit that referenced this pull request Jun 24, 2026
// dxsa.emit_then_cut
//===----------------------------------------------------------------------===//

def DXSA_EmitThenCut : DXSA_NullaryOp<"emit_then_cut"> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft call this emitThenCut rather than emit_then_cut, likewise for emitThenCut_stream, is it possible to use their name or does it need to be this?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instruction names in Microsoft's specification are formed according to different naming rules, rather than following a single uniform convention. We decided to use snake_case for operation names to maintain consistency across the dialect.

@@ -0,0 +1,154 @@
//===- DXSTopologyOps.td - DXSA topology ops ---------------*- tablegen -*-===//

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//===- DXSTopologyOps.td - DXSA topology ops ---------------*- tablegen -*-===//
//===- DXSATopologyOps.td - DXSA topology ops ---------------*- tablegen -*-===//

Comment thread mlir/test/Target/DXSA/topology.test Outdated
// CHECK-NEXT: dxsa.emit_stream 0
0x03000075, 0x00110000, 0x00000000

// CHECK-NEXT: dxsa.emit_stream 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant: all three stream ops decode the index through the same path. Maybe we can keep happy path for boundaries only (0 and 3)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, fixed that.

Comment thread mlir/test/Target/DXSA/topology.test Outdated
// CHECK-NEXT: dxsa.emit_stream 1
0x03000075, 0x00110000, 0x00000001

// CHECK-NEXT: dxsa.emit_stream 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Comment thread mlir/test/Target/DXSA/topology.test Outdated
// CHECK-NEXT: dxsa.cut_stream 0
0x03000076, 0x00110000, 0x00000000

// CHECK-NEXT: dxsa.cut_stream 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Comment thread mlir/test/Target/DXSA/topology.test Outdated
// CHECK-NEXT: dxsa.cut_stream 1
0x03000076, 0x00110000, 0x00000001

// CHECK-NEXT: dxsa.cut_stream 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Comment thread mlir/test/Target/DXSA/topology.test Outdated
// CHECK-NEXT: dxsa.emit_then_cut_stream 0
0x03000077, 0x00110000, 0x00000000

// CHECK-NEXT: dxsa.emit_then_cut_stream 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Comment thread mlir/test/Target/DXSA/topology.test Outdated
// CHECK-NEXT: dxsa.emit_then_cut_stream 1
0x03000077, 0x00110000, 0x00000001

// CHECK-NEXT: dxsa.emit_then_cut_stream 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

@dzhidzhoev dzhidzhoev requested a review from tagolog June 25, 2026 10:05
// DXSA shared bases for ops with inline operands
//===----------------------------------------------------------------------===//

class DXSA_NullaryOp<string mnemonic> : DXSA_Op<mnemonic> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is identical to what is in #194; I'm not sure which PR had it first and where the review comment should go. Regardless, the same comment applies here.

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.

3 participants