generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 53
Amd device plugin #748
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
Merged
Merged
Amd device plugin #748
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,23 @@ | ||
| [package] | ||
| name = "libdrm" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
| publish = false | ||
| build = "../build.rs" | ||
|
|
||
| [lib] | ||
| path = "../packages.rs" | ||
|
|
||
| [package.metadata.build-package] | ||
| releases-url = "https://dri.freedesktop.org/libdrm/" | ||
|
|
||
| [[package.metadata.build-package.external-files]] | ||
| url = "https://dri.freedesktop.org/libdrm/libdrm-2.4.129.tar.xz" | ||
| sha512 = "3ee702cc4a578e9ab231caf8a84700e4dff6f3da70731610121ac2c3390f42e42ad144ea61c53582e3a8adfb1d6bf8254993c5c6eaf85a51421e26d51d341cd4" | ||
|
|
||
| [[package.metadata.build-package.external-files]] | ||
| url = "https://dri.freedesktop.org/libdrm/libdrm-2.4.129.tar.xz.sig" | ||
| sha512 = "21baba37df19d0adf805e508f91e28f2bbdaa4d7fb6f99837d31c9d966833fbd8bdd93d97eab724b5a79e4d0ef4636fea176cd34db6c527da7e0b88907dd12db" | ||
|
|
||
| [build-dependencies] | ||
| glibc = { path = "../glibc" } |
301 changes: 301 additions & 0 deletions
301
packages/libdrm/gpgkey-34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48.asc
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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,63 @@ | ||
| Name: %{_cross_os}libdrm | ||
| Version: 2.4.129 | ||
| Release: 1%{?dist} | ||
| Summary: Direct rendering manager library | ||
| License: MIT | ||
| URL: https://dri.freedesktop.org | ||
| Source0: https://dri.freedesktop.org/libdrm/libdrm-%{version}.tar.xz | ||
| Source1: https://dri.freedesktop.org/libdrm/libdrm-%{version}.tar.xz.sig | ||
| Source2: gpgkey-34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48.asc | ||
|
|
||
| BuildRequires: %{_cross_os}glibc-devel | ||
| Requires: %{_cross_os}glibc | ||
|
|
||
| %description | ||
| %{summary}. | ||
|
|
||
| %package devel | ||
| Summary: Files for development using the direct rendering manager library | ||
| Requires: %{name} | ||
|
|
||
| %description devel | ||
| %{summary}. | ||
|
|
||
| %prep | ||
| %{gpgverify} --data=%{S:0} --signature=%{S:1} --keyring=%{S:2} | ||
| %autosetup -n libdrm-%{version} -p1 | ||
|
|
||
| %build | ||
| CONFIGURE_OPTS=( | ||
| --auto-features=disabled | ||
| -Dcairo-tests=disabled | ||
| -Dman-pages=disabled | ||
| -Dvalgrind=disabled | ||
| -Dfreedreno=disabled | ||
| -Dvc4=disabled | ||
| -Detnaviv=disabled | ||
| -Dexynos=disabled | ||
| -Dtegra=disabled | ||
| -Domap=disabled | ||
| -Dintel=disabled | ||
| -Dradeon=disabled | ||
| -Damdgpu=enabled | ||
| -Dnouveau=disabled | ||
| -Dtests=false | ||
| ) | ||
|
|
||
| %cross_meson "${CONFIGURE_OPTS[@]}" | ||
| %cross_meson_build | ||
|
|
||
| %install | ||
| %cross_meson_install | ||
|
|
||
| %files | ||
| %{_cross_attribution_file} | ||
| %{_cross_libdir}/libdrm.so.* | ||
| %{_cross_libdir}/libdrm_amdgpu.so.* | ||
| %{_cross_datadir}/libdrm/amdgpu.ids | ||
|
|
||
| %files devel | ||
| %{_cross_libdir}/libdrm.so | ||
| %{_cross_libdir}/libdrm_amdgpu.so | ||
| %{_cross_includedir}/* | ||
| %{_cross_pkgconfigdir}/*.pc |
This file contains hidden or 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,21 @@ | ||
| [package] | ||
| name = "rocm-k8s-device-plugin" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
| publish = false | ||
| build = "../build.rs" | ||
|
|
||
| [lib] | ||
| path = "../packages.rs" | ||
|
|
||
| [package.metadata.build-package] | ||
| releases-url = "https://github.com/ROCm/k8s-device-plugin/releases" | ||
|
|
||
| [[package.metadata.build-package.external-files]] | ||
| url = "https://github.com/ROCm/k8s-device-plugin/archive/v1.31.0.8.tar.gz" | ||
mgsharm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| sha512 = "23a127b46ad15cabbdd9abe18a8b75140340dcb10f41c9efdcfd30b38db7142edabaf6a97ed2c621f0414c78c0cb87fdc81a30b5e3fb016d16cbd11210143326" | ||
|
|
||
| [build-dependencies] | ||
| glibc = { path = "../glibc" } | ||
| libdrm = { path = "../libdrm" } | ||
| hwloc = { path = "../hwloc" } | ||
17 changes: 17 additions & 0 deletions
17
packages/rocm-k8s-device-plugin/rocm-k8s-device-plugin.service
This file contains hidden or 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,17 @@ | ||
| [Unit] | ||
| Description=Start ROCm kubernetes device plugin | ||
| After=kubelet.service [email protected] | ||
| Wants=kubelet.service [email protected] | ||
|
|
||
| [Service] | ||
| # Ensure that the kubelet device plugin socket exists before we start | ||
| # A brief sleep is needed to avoid the `test` failing its first check | ||
| ExecStartPre=/usr/bin/sleep 0.1 | ||
| ExecStartPre=/usr/bin/test -S /var/lib/kubelet/device-plugins/kubelet.sock | ||
| ExecStart=/usr/bin/rocm-device-plugin -logtostderr=true -stderrthreshold=INFO -v=5 | ||
mgsharm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| TimeoutSec=0 | ||
| RestartSec=2 | ||
| Restart=always | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
74 changes: 74 additions & 0 deletions
74
packages/rocm-k8s-device-plugin/rocm-k8s-device-plugin.spec
This file contains hidden or 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,74 @@ | ||
| %global goproject github.com/ROCm | ||
| %global gorepo k8s-device-plugin | ||
| %global goimport %{goproject}/%{gorepo} | ||
|
|
||
| %global gover 1.31.0.8 | ||
| %global rpmver %{gover} | ||
|
|
||
| Name: %{_cross_os}rocm-k8s-device-plugin | ||
| Version: %{rpmver} | ||
| Release: 1%{?dist} | ||
| Summary: Kubernetes device plugin for AMD GPUs | ||
| License: Apache-2.0 | ||
| URL: https://github.com/ROCm/k8s-device-plugin | ||
| Source0: https://github.com/ROCm/k8s-device-plugin/archive/v%{gover}.tar.gz | ||
| Source1: rocm-k8s-device-plugin.service | ||
|
|
||
| BuildRequires: %{_cross_os}glibc-devel | ||
| BuildRequires: %{_cross_os}libdrm-devel | ||
| BuildRequires: %{_cross_os}hwloc-devel | ||
| Requires: %{name}(binaries) | ||
| Requires: %{_cross_os}libdrm | ||
| Requires: %{_cross_os}hwloc | ||
|
|
||
| %description | ||
| %{summary}. | ||
|
|
||
| %package bin | ||
| Summary: Kubernetes device plugin for AMD GPUs binaries | ||
| Provides: %{name}(binaries) | ||
| Requires: (%{_cross_os}image-feature(no-fips) and %{name}) | ||
| Conflicts: (%{_cross_os}image-feature(fips) or %{name}-fips-bin) | ||
|
|
||
| %description bin | ||
| %{summary}. | ||
|
|
||
| %package fips-bin | ||
| Summary: Kubernetes device plugin for AMD GPUs binaries, FIPS edition | ||
| Provides: %{name}(binaries) | ||
| Requires: (%{_cross_os}image-feature(fips) and %{name}) | ||
| Conflicts: (%{_cross_os}image-feature(no-fips) or %{name}-bin) | ||
|
|
||
| %description fips-bin | ||
| %{summary}. | ||
|
|
||
| %prep | ||
| %autosetup -n %{gorepo}-%{gover} -p1 | ||
| %cross_go_setup %{gorepo}-%{gover} %{goproject} %{goimport} | ||
|
|
||
| %build | ||
| %cross_go_configure %{goimport} | ||
|
|
||
| go build -ldflags="${GOLDFLAGS}" -o rocm-device-plugin ./cmd/k8s-device-plugin/ | ||
| gofips build -ldflags="${GOLDFLAGS}" -o fips/rocm-device-plugin ./cmd/k8s-device-plugin/ | ||
|
|
||
| %install | ||
| install -d %{buildroot}%{_cross_bindir} | ||
| install -p -m 0755 rocm-device-plugin %{buildroot}%{_cross_bindir} | ||
|
|
||
| install -d %{buildroot}%{_cross_fips_bindir} | ||
| install -p -m 0755 fips/rocm-device-plugin %{buildroot}%{_cross_fips_bindir} | ||
|
|
||
| install -d %{buildroot}%{_cross_unitdir} | ||
| install -p -m 0644 %{S:1} %{buildroot}%{_cross_unitdir} | ||
|
|
||
| %files | ||
| %license LICENSE | ||
| %{_cross_attribution_file} | ||
| %{_cross_unitdir}/rocm-k8s-device-plugin.service | ||
|
|
||
| %files bin | ||
| %{_cross_bindir}/rocm-device-plugin | ||
|
|
||
| %files fips-bin | ||
| %{_cross_fips_bindir}/rocm-device-plugin |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.