Skip to content

Cleanup rocMLIR build warnings#2255

Merged
justinrosner merged 1 commit intodevelopfrom
justinr-cleanup-build-warnings
Feb 26, 2026
Merged

Cleanup rocMLIR build warnings#2255
justinrosner merged 1 commit intodevelopfrom
justinr-cleanup-build-warnings

Conversation

@justinrosner
Copy link
Contributor

@justinrosner justinrosner commented Feb 25, 2026

Motivation

This is just a small PR to clean up build warnings that happen when building rocMLIR.

Technical Details

  • rocmlirCustomTosaDecompose: Switch from rewriter.create<tensor::EmptyOp> -> tensor::EmptyOp::create
  • AmdArchDb: .Cases("a", "b", val).Cases({"a", "b"}, val)
  • EmulateNarrowType: Replace rewriter.create calls with op::create

Test Plan

  • PR CI

Test Result

  • PR CI

Submission Checklist

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up rocMLIR build warnings by updating a few MLIR/LLVM API call sites to their non-deprecated forms.

Changes:

  • Replace several rewriter.create<...> uses with Op::create(...) helpers in Rock narrow-type emulation and rocMLIR custom TOSA decompose.
  • Update llvm::StringSwitch usage to the non-deprecated Cases({ ... }, value) overload for gfx10 minor parsing.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
mlir/lib/Dialect/Rock/Transforms/EmulateNarrowType.cpp Switch constant and reinterpret_cast construction to Op::create helpers.
mlir/lib/Dialect/Rock/IR/AmdArchDb.cpp Use StringSwitch::Cases(std::initializer_list<...>) to avoid deprecated overload warnings.
mlir/lib/Conversion/RocmlirCustomTosaDecompose/RocmlirCustomTosaDecompose.cpp Construct tensor.empty and tensor.insert_slice via Op::create helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@justinrosner justinrosner merged commit 3d16848 into develop Feb 26, 2026
9 of 16 checks passed
@justinrosner justinrosner deleted the justinr-cleanup-build-warnings branch February 26, 2026 13:25
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