Skip to content

Conversation

@coleramos425
Copy link
Collaborator

@coleramos425 coleramos425 commented Jul 12, 2025

Summary

This PR pulls in recent changes made to Omniprobe to support JSON output in the Memory Analysis pipeline, which improves the resiliency of Intelliperf to regex parsing errors
AMDResearch/omniprobe#26

Major changes:

  • pyproject.toml now points to the latest (corresponding) Omniprobe commit and ditches old SSH based cloning strategies in favor of HTTPS to decuple the crutch we had on ssh keys before. Updated Nexus to use the same technique when pulling kerneldb
  • New streamlined containerization setup which supports Apptainer and Docker from the same build script (containers/run.sh). Improved usability and enabled me to adequately test new Omniprobe functionality
  • Modified scripts/build_examples.sh and CMakeLists.txt to allow user to optionally specify path to their Omniprobe install for instrumentation support

Example:

intelliperf -vvv --project_directory=/intelliperf/examples --build_command="./scripts/build_examples.sh -c" --instrument_command="./scripts/build_examples.sh -i -c -o /intelliperf/external/omniprobe/install" --formula=bankConflict --provider https://llm-api.amd.com/azure --model dvue-aoai-001-o4-mini --num_attempts 1 -- ./build/bank_conflict/matrix_transpose 1024 1024
  • Instrument command uses new -o/--omniprobe option to specify path to Omniprobe install, which is used by CMake to build examples
  • I use AMD's LLM Gateway for my testing, but should work with your OpenAI API key too
  • --num-attempts set to 1 for brevity

Logs:
https://gist.github.com/coleramos425/567c7972647e02faa59d7977803f4652

Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
…nsolidated into a single run.sh script

Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
…have some notion of versioning

Signed-off-by: coleramos425 <colramos@amd.com>
@mawad-amd
Copy link
Member

CI is a bit fragile at the moment. Will fix soon.

coleramos425 and others added 16 commits July 14, 2025 13:37
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
…ments

Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
…nt (first kernel)

Signed-off-by: coleramos425 <colramos@amd.com>
…niprobe report with clone suffix

Signed-off-by: coleramos425 <colramos@amd.com>
…ntended. Must modify shell cmd to cd to working_directory when specified

Signed-off-by: coleramos425 <colramos@amd.com>
…cmds with new implementation

Signed-off-by: coleramos425 <colramos@amd.com>
@coleramos425 coleramos425 force-pushed the colramos/omniprobe-parser branch from b71a643 to 76c71f3 Compare July 30, 2025 16:54
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
@coleramos425 coleramos425 marked this pull request as ready for review July 30, 2025 22:47
@coleramos425 coleramos425 requested a review from mawad-amd July 30, 2025 22:47
verbose = logging.getLogger().getEffectiveLevel() <= logging.DEBUG

logging.debug(f"Running the command: {' '.join(subprocess_args)}")
# logging.debug(f"Running the command: {' '.join(subprocess_args)}")
Copy link
Member

Choose a reason for hiding this comment

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

Can we uncomment out this line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Look at line 69 in the same file. It has been commented out here, because the to print the true value of subprocess_args the debug is best here

Copy link
Member

Choose a reason for hiding this comment

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

You can just remove the code commented out code then.

if additional_path is not None:
env["PATH"] = str(additional_path) + ":" + env["PATH"]

if working_directory is not None:
Copy link
Member

@mawad-amd mawad-amd Jul 30, 2025

Choose a reason for hiding this comment

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

I am not sure what this logic is doing and why it is needed here. We can't simply change paths since the user may pass something like: intelliperf --project_directory="./" -- ./foo ./my_input_file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The way we run subprocesses in Intelliperf has changed. Since we are now activating Omniprobe, we must account for the fact that Omniprobe’s exe triggers a nested subprocess.run() call which initializes its own environment, disparate from the environment variables (i.e. PWD) that we initialize in Intelliperf’s capture_subprocess_output() function.

This is why you see that now, if given a working_directory, the function will embed a shell cd command into subprocess_args. This is why I commented out the earlier debug statement, because to be accurate we should print subprocess_args after this conditional.

Copy link
Member

Choose a reason for hiding this comment

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

Omniprobe should respect the environment variables and working dir we set. A command like this intelliperf --project_directory="./" -- ./foo ./my_input_file will break this code.

(Also, I am questioning the whole copy to tmp at the moment but that's for a different PR that I will fix.)

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I take my comment back. This will work fine. I don't understand why Omniprobe will change the working directory though.

Copy link
Member

@mawad-amd mawad-amd left a comment

Choose a reason for hiding this comment

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

This is looking great. Thanks! I left a few comments.

@coleramos425 coleramos425 force-pushed the colramos/omniprobe-parser branch from b0c1697 to f1bb741 Compare July 31, 2025 20:27
coleramos425 and others added 7 commits July 31, 2025 20:33
Signed-off-by: coleramos425 <colramos@amd.com>
…vailible

Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
@coleramos425
Copy link
Collaborator Author

@mawad-amd feedback has been addressed. Please take another look when you have a chance. Thanks!

Updated logs (based on newest changes):
https://gist.github.com/coleramos425/bbd4dac0ef8d97319ce4cb1ced9a9d69

@coleramos425 coleramos425 changed the title Omniprobe parser + container updates Omniprobe parser for bank conflicts Aug 18, 2025
@coleramos425
Copy link
Collaborator Author

Edit 8/18

Moved containerization material into a separate PR (#142) per request from @mawad-amd

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