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

misc: Add Omnitrace and Omniperf to Dockerfile.amd #2032

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

FabioLuporini
Copy link
Contributor

No description provided.

Copy link
Contributor

@mloubout mloubout left a comment

Choose a reason for hiding this comment

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

Some nitpicking

mv omnitrace-installer.sh /opt/omnitrace && \
cd /opt/omnitrace && \
./omnitrace-installer.sh --skip-license && \
cd -
Copy link
Contributor

Choose a reason for hiding this comment

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

no needed automatically exits back to base dir at the ned of RUN

Copy link
Contributor

Choose a reason for hiding this comment

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

Can be simplified to one line with just

RUN ./omnitrace-1.7.3-ubuntu-20.04-ROCm-50100-PAPI-OMPT-Python3.sh --prefix=/opt/omnitrace --exclude-subdir --skip-license && rm omnitrace-1.7.3-ubuntu-20.04-ROCm-50100-PAPI-OMPT-Python3.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

docker/Dockerfile.amd Outdated Show resolved Hide resolved
docker/entrypoint.sh Outdated Show resolved Hide resolved
@FabioLuporini FabioLuporini changed the title misc: Add Omnitrace to Dockerfile.amd misc: Add Omnitrace and Omniperf to Dockerfile.amd Nov 22, 2022
@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #2032 (d4e9dc3) into master (30cad76) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2032   +/-   ##
=======================================
  Coverage   87.85%   87.85%           
=======================================
  Files         214      214           
  Lines       37327    37327           
  Branches     5627     5627           
=======================================
  Hits        32794    32794           
  Misses       4007     4007           
  Partials      526      526           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@mloubout mloubout left a comment

Choose a reason for hiding this comment

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

some extra comments

docker/Dockerfile.amd Outdated Show resolved Hide resolved
docker/Dockerfile.amd Outdated Show resolved Hide resolved
docker/Dockerfile.amd Outdated Show resolved Hide resolved
docker/Dockerfile.amd Show resolved Hide resolved
Copy link
Contributor Author

@FabioLuporini FabioLuporini left a comment

Choose a reason for hiding this comment

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

@mloubout one question

I had to switch from

ENV OMNIPERF_DIR=/opt/omniperf

to

ENV OMNIPERF_DIR=/app/omniperf

because for some reason the package wouldn't appear in opt. Any idea what the cause might be? 😮

@FabioLuporini
Copy link
Contributor Author

@mloubout I've pushed some edits, but I still have to test this: ROCm/omnitrace#217 (comment)

@mloubout
Copy link
Contributor

That's weird for /opt that's where nvhpc is installed and it works fine.

Did you look at the log? May be just that need to create the directory first

@FabioLuporini
Copy link
Contributor Author

log was fine AFAICT

Also, this env var

ENV OMNIPERF_DIR=/app/omniperf

Doesn't persist in the container. LIterally, it's not there. Any idea @mloubout ?

@FabioLuporini
Copy link
Contributor Author

I pushed several edits. Could you take another look @mloubout ?

Copy link
Contributor

@georgebisbas georgebisbas left a comment

Choose a reason for hiding this comment

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

Added some minor comments

# This Dockerfile contains AMD compilers
##############################################################
####################################################################################
# This Dockerfile contains the AMD ROCm SDK as well as other useful tools for Devito
Copy link
Contributor

Choose a reason for hiding this comment

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

as well as AMD profiling tools (Omnitrace, Omniperf) useful to Devito... or something like this...

docker/Dockerfile.amd Show resolved Hide resolved
@@ -45,11 +63,52 @@ ENV PATH=${PATH}:/opt/openmpi/bin:$AOMP/bin
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/openmpi/lib:$AOMP/lib
ENV OMPI_CC=$AOMP/bin/clang

# Devito env
# Install Omnitrace, an AMDResearch profiling tool akin to Nvidia's Nsight-systems
Copy link
Contributor

Choose a reason for hiding this comment

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

I would drop akin to....

Choose a reason for hiding this comment

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

Omniperf is very similar to Nsight-Compute but the capabilities of Omnitrace far exceed the capabilities of Nsight-Systems. Intel's VTune is closer analogue.

./omnitrace-1.7.3-ubuntu-20.04-ROCm-50100-PAPI-OMPT-Python3.sh --prefix=${OMNITRACE_DIR} --exclude-subdir --skip-license && \
rm omnitrace-1.7.3-ubuntu-20.04-ROCm-50100-PAPI-OMPT-Python3.sh

# Install Omniperf, an AMDResearch profiling tool akin to Nvidia's Nsight-compute
Copy link
Contributor

Choose a reason for hiding this comment

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

same

docker/Dockerfile.amd Show resolved Hide resolved
docker/Dockerfile.amd Show resolved Hide resolved

ENV DEVITO_ARCH="hip"
ENV DEVITO_PLATFORM="amdgpuX"
ENV DEVITO_LANGUAGE="hip"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be added to the cron CI?

Also maybe a line in the Readme that it's an option now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can and should add it to the cron jobs, I agree.

We shouldn't isntead write anything in the README until support is complete. This is to be regarded as a dev utility for now

@mloubout
Copy link
Contributor

This should be gtg right

@FabioLuporini
Copy link
Contributor Author

I'm waiting for this ROCm/omniperf#45 (comment)

I'll tag u in that issue so that you can track progress

@mloubout
Copy link
Contributor

Status on this? Still wanted?

@FabioLuporini
Copy link
Contributor Author

@mloubout yes, but some story as Dockerfile.amd -- I want to be able to pull in from something they maintain , especially since the project is young

But we definitely want the AMD profilers in

@FabioLuporini
Copy link
Contributor Author

Just checked -- They have added something recently, but ...

https://github.com/AMDResearch/omniperf/blob/main/docker/ubuntu20.04/Dockerfile

an amdgpu package? unsure..

@mloubout
Copy link
Contributor

So what's the plan for this?

@FabioLuporini
Copy link
Contributor Author

HOnestly don't know yet, I have to look at their latest installation instructions to see if it got any simpler

the way it is at the moment is too painful and I wouldn't want to maintain it

That said, having the AMD profiler around in our Docker image would be quite useful...

@jrmadsen
Copy link

wget https://github.com/AMDResearch/omnitrace/releases/latest/download/omnitrace-install.py
python3 ./omnitrace-install.py --prefix /opt/omnitrace/rocm-5.4 --rocm 5.4

Omnitrace installation is quite straightforward

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.

None yet

4 participants