Skip to content
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

Update scripts to allow extra flags. #10

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

MaheshRavishankar
Copy link
Contributor

@MaheshRavishankar MaheshRavishankar commented Oct 4, 2024

Couple of changes in this PR

  1. --Xiree_compile can take now a list of flags to pass to iree-compile without having to specify --Xiree-compile multiple times. Note that the flags passed to iree-compile should not contain --
  2. Capture the stderr for run_iree_command and pass back to caller. This allows generating IR dumps.

For example
--Xiree_compile mlir-disable-threading mlir-print-ir-before=<pass-list> mlir-print-ir-after=<pass-list> dumps IR before and after passes to *.stderr.mlir .

@MaheshRavishankar MaheshRavishankar marked this pull request as ready for review October 4, 2024 22:00
gemmbench/gemm_bench.py Outdated Show resolved Hide resolved
Copy link
Contributor

@saienduri saienduri left a comment

Choose a reason for hiding this comment

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

LGTM, thanks (didn't account for the stderr in the successful execution case 😄)

Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

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

Why would you prefer to have it this way? The -Xprefix pattern is common in other tools like clang (-Xclang and -mllvm)

@MaheshRavishankar
Copy link
Contributor Author

Why would you prefer to have it this way? The -Xprefix pattern is common in other tools like clang (-Xclang and -mllvm)

Yeah, that very unergnomic. I always felt its probably just an artifact how the CL parser is implemented.

@MaheshRavishankar
Copy link
Contributor Author

@saienduri this seems to be hitting some unrelated failure on CI. Could you please take a look?

@saienduri
Copy link
Contributor

Sure, @MaheshRavishankar I have landed this PR (#11) which fixes the CI. Once you rebase, you should be good

default=[],
help="Extra command line arguments passed to the IREE compiler. This can be specified multiple times to pass multiple arguments."
help="Extra command line arguments passed to the IREE compiler. The flags need to be specified without the `--` or `-`"
)
parser.add_argument(
Copy link
Member

Choose a reason for hiding this comment

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

If you change this one one, I think we should also change the two flags below to use nargs=+

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe... i dont know where all it is used. Could be a follow up.

Signed-off-by: MaheshRavishankar <mravisha@amd.com>
Signed-off-by: MaheshRavishankar <mravisha@amd.com>
…command`

Signed-off-by: MaheshRavishankar <mravisha@amd.com>
Signed-off-by: MaheshRavishankar <mravisha@amd.com>
Signed-off-by: MaheshRavishankar <mravisha@amd.com>
Signed-off-by: MaheshRavishankar <mravisha@amd.com>
@saienduri saienduri merged commit 11fd8c4 into nod-ai:main Oct 8, 2024
1 check passed
kuhar added a commit to kuhar/iree-kernel-benchmark that referenced this pull request Oct 8, 2024
Use nargs=+ for data types and variants to align with extra compiler
args. This is a follow up after nod-ai#10.
kuhar added a commit that referenced this pull request Oct 8, 2024
Use nargs=+ for data types and variants to align with extra compiler
args. This is a follow up after #10.
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