Skip to content

Резанцева Анастасия. 3822Б1ФИ1. Лабораторная 4: MLIR. Вариант 4. #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

AnastasiaRezantseva
Copy link

MaxDepthPass - это пасс, который вычисляет максимальную глубину вложенности для каждого цикла в MLIR-функциях. Пасс поддерживает различные виды циклов и учитывает вложенные условные конструкции.

Рекурсивный анализ вложенности:

  • Метод computeDepth() рекурсивно обходит регионы операций

  • Учитывает как вложенные циклы, так и условные конструкции

  • Сохраняет результаты как атрибут функции my_loop_depths (отсортированный по убыванию)

Поддерживаемые операции:

Циклы: affine.for, scf.for, scf.while, scf.forall, spirv.LoopOp

Условия: affine.if, scf.if, spirv.SelectionOp

@AnastasiaRezantseva AnastasiaRezantseva requested a review from m-ly4 May 20, 2025 16:44
@m-ly4
Copy link

m-ly4 commented May 21, 2025

Overall, LGTM. I just left a few nit picks that can be applied optionally.

AnastasiaRezantseva and others added 2 commits May 21, 2025 14:50
Co-authored-by: m-ly4 <[email protected]>
Co-authored-by: m-ly4 <[email protected]>
@m-ly4 m-ly4 added this pull request to the merge queue May 21, 2025
Merged via the queue into NN-complr-tech:course-spring-2025 with commit 104684a May 21, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants