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

Enable GCC Toolet 12 to support AVX VNNI #473

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

nzwulfin
Copy link
Contributor

@nzwulfin nzwulfin commented Nov 20, 2024

Fixes issue #471 based on a Red Hat KBase article (subscription required), to use AVX VNNI on platforms that support it a later version of binutils is needed.

This adds the GCC 12 Toolset and directly sources the environment vars into the build script.

There are also toolsets available for GCC 13 and 14 available if there's a need for more current versions. They should work the same way.

Summary by Sourcery

Build:

  • Add GCC Toolset 12 to the build script for AVX VNNI support.

Copy link
Contributor

sourcery-ai bot commented Nov 20, 2024

Reviewer's Guide by Sourcery

This PR enables AVX VNNI support by upgrading the GCC compiler to version 12 through the GCC toolset. The implementation modifies the build script to install and activate GCC toolset 12 specifically for CUDA builds.

Sequence diagram for the build script modification

sequenceDiagram
    participant Developer
    participant BuildScript
    participant System
    Developer->>BuildScript: Modify script to include GCC toolset 12
    BuildScript->>System: Install gcc-toolset-12
    BuildScript->>System: Source /opt/rh/gcc-toolset-12/enable
    System-->>BuildScript: GCC toolset 12 enabled
Loading

Class diagram for the build script changes

classDiagram
    class BuildScript {
        - rpm_list: Array
        + dnf_install(containerfile)
    }
    note for BuildScript "Added gcc-toolset-12 installation and sourcing for CUDA builds"
Loading

File-Level Changes

Change Details Files
Added GCC toolset 12 installation and activation for CUDA builds
  • Added gcc-toolset-12 to the CUDA-specific package installation list
  • Added source command to enable GCC toolset 12 environment variables
container-images/scripts/build_llama_and_whisper.sh

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @nzwulfin - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please add a brief comment in the script explaining that GCC 12 toolset is needed for AVX VNNI support
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rhatdan
Copy link
Member

rhatdan commented Nov 20, 2024

You have to sign your commits

git commit -a --amend -s
git push --force

@nzwulfin
Copy link
Contributor Author

Thanks @rhatdan, should be signed now. I don't need to update this PR right?

@rhatdan
Copy link
Member

rhatdan commented Nov 20, 2024

@bmahabirbu PTAL
LGTM

@rhatdan rhatdan merged commit 1529a9b into containers:main Nov 20, 2024
12 checks passed
@bmahabirbu
Copy link
Collaborator

Looks good!

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