forked from tinygrad/open-gpu-kernel-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/550.127.08-p2p' into 550.142-p2p
# Conflicts: # README.md
- Loading branch information
Showing
11 changed files
with
238 additions
and
975 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-deb: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: sudo apt-get install -y build-essential dpkg-dev | ||
- name: Download source deb | ||
run: | | ||
branch=$(echo $GITHUB_REF | cut -d'/' -f3) | ||
branch=${branch/-p2p/} | ||
# download source deb | ||
curl -o source.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/nvidia-kernel-source-550-open_${branch}-0ubuntu1_amd64.deb | ||
- name: Extract source deb | ||
run: dpkg-deb -R source.deb source-deb | ||
- name: Build kernel module | ||
run: | | ||
make modules -j$(nproc) | ||
- name: Replace kernel module source | ||
run: | | ||
branch=$(echo $GITHUB_REF | cut -d'/' -f3) | ||
branch=${branch/-p2p/} | ||
cp kernel-open/nvidia/nv-pci.c source-deb/usr/src/nvidia-${branch}/nvidia/nv-pci.c | ||
- name: Replace kernel module | ||
run: | | ||
branch=$(echo $GITHUB_REF | cut -d'/' -f3) | ||
branch=${branch/-p2p/} | ||
cp src/nvidia/_out/Linux_x86_64/nv-kernel.o source-deb/usr/src/nvidia-${branch}/nvidia/nv-kernel.o_binary | ||
cp src/nvidia-modeset/_out/Linux_x86_64/nv-modeset-kernel.o source-deb/usr/src/nvidia-${branch}/nvidia-modeset/nv-modeset-kernel.o_binary | ||
- name: Repack deb | ||
run: dpkg-deb -b source-deb nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | ||
- name: Upload deb | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | ||
path: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | ||
- name: Create release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
sudo rmmod nvidia_drm nvidia_modeset nvidia_uvm nvidia | ||
set -e | ||
make modules -j$(nproc) | ||
sudo make modules_install -j$(nproc) | ||
sudo depmod | ||
nvidia-smi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.