Skip to content

Change make_ttgir and make_llir to make it closer to OpenAI version#4010

Merged
etiotto merged 5 commits intomainfrom
etiotto.refactor_ttgir_llir
Apr 25, 2025
Merged

Change make_ttgir and make_llir to make it closer to OpenAI version#4010
etiotto merged 5 commits intomainfrom
etiotto.refactor_ttgir_llir

Conversation

@etiotto
Copy link
Copy Markdown
Contributor

@etiotto etiotto commented Apr 24, 2025

This path modifies make_ttgir and make_llir to make it more similar to the OpenAI versions. Specifically:

  • created functions to "group" additional code (e.g. options validation) not present in the OpenAI implementation
  • adds add_allocate_global_scratch_memory(pm) , cananicolizations, cst to the make_llir pass pipeline

Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
Copy link
Copy Markdown
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 refactors the TTGIR/LLIR generation pipeline in the Intel backend to align the implementation closer to the OpenAI version. Key changes include the extraction of helper methods for options validation and module annotation, removal of inline warp-specialization in make_llir, and the addition of new passes (global scratch memory allocation, canonicalization, and common subexpression elimination) in the LLIR pipeline.

Comments suppressed due to low confidence (2)

third_party/intel/backend/compiler.py:341

  • The previous warp-specialization block that adjusted num_warps by multiplying with num_warp_groups has been removed. Confirm that this change aligns with the new design and does not introduce unintended behavior.
def make_llir(src, metadata, options):

third_party/intel/backend/compiler.py:303

  • Verify that the updated order—annotating the module, retrieving threads_per_warp, and then validating options—preserves the intended constraints without introducing discrepancies compared to the previous inline validation.
XPUBackend.validate_options(opt, properties)

Comment thread third_party/intel/backend/compiler.py Outdated
@etiotto etiotto self-assigned this Apr 24, 2025
etiotto added 2 commits April 24, 2025 21:59
Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
Comment thread third_party/intel/backend/compiler.py Outdated
@etiotto etiotto marked this pull request as ready for review April 25, 2025 13:23
etiotto added 2 commits April 25, 2025 13:32
Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
Copy link
Copy Markdown
Contributor

@whitneywhtsang whitneywhtsang left a comment

Choose a reason for hiding this comment

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

Please ensure no performance regressions before merging.

@etiotto
Copy link
Copy Markdown
Contributor Author

etiotto commented Apr 25, 2025

@etiotto etiotto merged commit f6c1bc5 into main Apr 25, 2025
10 checks passed
@etiotto etiotto deleted the etiotto.refactor_ttgir_llir branch April 25, 2025 16:08
david-hls pushed a commit to david-hls/intel-xpu-backend-for-triton that referenced this pull request Jun 18, 2025
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.

4 participants