Add nvidia-sdpa workaround for aarch64#1
Add nvidia-sdpa workaround for aarch64#1colonelpanik wants to merge 1 commit intodatacrunch-research:mainfrom
Conversation
Summary of ChangesHello @colonelpanik, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a compatibility issue where the upstream NVIDIA Scaled Dot Product Attention (SDPA) benchmark, designed for x86_64 systems, fails to run on aarch64 architectures like Nvidia Grace CPUs. It provides a practical solution by supplying a modified Dockerfile and detailed instructions, enabling users to successfully execute the SDPA benchmark on ARM-based systems. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a Dockerfile and README to run the NVIDIA SDPA benchmark on aarch64 systems. The changes are functional, but the Dockerfile can be improved. I've provided suggestions to optimize the Docker image by reducing layers and cleaning up build artifacts, following Docker best practices. This will result in a smaller and more efficient image.
| RUN pip install --upgrade pip && \ | ||
| pip install seaborn |
There was a problem hiding this comment.
To improve Docker image efficiency and reduce the number of layers, it's a good practice to combine RUN instructions. The two pip install commands can be merged into one. Using --no-cache-dir with pip prevents caching and further reduces the final image size.
RUN pip install --no-cache-dir --upgrade pip seaborn
| RUN apt-get update && \ | ||
| wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/cuda-keyring_1.1-1_all.deb && \ | ||
| dpkg -i cuda-keyring_1.1-1_all.deb && \ | ||
| apt-get update && \ | ||
| apt-get -y install cudnn9-cuda-13 |
There was a problem hiding this comment.
To optimize the Docker image size, it's important to clean up temporary files and caches within the same RUN layer they are created. The downloaded .deb file should be removed, and the apt cache should be cleared after installation to reduce the final image size.
RUN apt-get update && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/cuda-keyring_1.1-1_all.deb && \
dpkg -i cuda-keyring_1.1-1_all.deb && \
rm cuda-keyring_1.1-1_all.deb && \
apt-get update && \
apt-get -y install cudnn9-cuda-13 && \
rm -rf /var/lib/apt/lists/*
| COPY benchmark_bf16_sdpa.py . | ||
|
|
||
| COPY benchmark_fp8_sdpa.py . | ||
|
|
||
| COPY benchmark_single_sdpa.py . |
No description provided.