public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/oidn/files/, media-libs/oidn/
@ 2025-03-07 13:22 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2025-03-07 13:22 UTC (permalink / raw
  To: gentoo-commits

commit:     1a382d070b821d8247e0ea87e55faca0f97d3d10
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Thu Jan 30 22:08:31 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  7 13:21:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a382d07

media-libs/oidn: add 2.3.2

Closes: https://github.com/gentoo/gentoo/pull/39854
Closes: https://github.com/gentoo/gentoo/pull/40320
Closes: https://bugs.gentoo.org/950261
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40390
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/oidn/Manifest                           |   2 +-
 .../files/oidn-2.3.1-composable-kernel-api.patch   |  28 +++
 .../oidn-2.3.1-system-composable-kernel.patch      | 199 +++++++++++++++++++++
 .../oidn/{oidn-2.3.1.ebuild => oidn-2.3.2.ebuild}  |  41 +++--
 4 files changed, 254 insertions(+), 16 deletions(-)

diff --git a/media-libs/oidn/Manifest b/media-libs/oidn/Manifest
index f23995017019..f163792ea8c6 100644
--- a/media-libs/oidn/Manifest
+++ b/media-libs/oidn/Manifest
@@ -1,3 +1,3 @@
 DIST oidn-2.2.2.tar.gz 49006605 BLAKE2B e3d32cc2112ded280e642c5d69fb2ef14db59df4f5224bff79e82ede207899c9dbfa43dc663ad9ccc15a6497e363df0b91b43660729962c410b7ec75ac1b3465 SHA512 eca18e9e22a40bc1381e75985e5f5e79f48cc6d168a2a703e54540967646487d347db290459e9a612d8ab4924e8d3c83d84664fd5318cca4f17745da1e47cf50
 DIST oidn-2.3.0.tar.gz 75300547 BLAKE2B 88a5922b4db63c48ab69047dca8d1077205a6d7a2112971badb0cd35e0b770017f5cdcc95d2ef07016fe2e990e3e5806ac6a0800b67086b958948c542f0dff6f SHA512 4f68ce3b0da37e1861090d60d7cd823046f325c45a8e2c3f4098eb3b4f7ec676d2acbb9c138ff60a9f83188dd0dcbaba42106aad96beafc5e65045c77c00f2f8
-DIST oidn-2.3.1.tar.gz 75315393 BLAKE2B d031e89924f82514994f61909d949b5dc55585cca6fbe26aba2e587f2afd03a6ae195aa93c0bbe67554224bab97ab552a4f33723786068abb82c1f6dde58e2b4 SHA512 ed3c99ba3d6634d8ca55786e4e62fe78cf6941e80736e6fcdf8e4f7b08aa45d1a546692bc64fedead31598b32b050a7d8a7e2cd1a6f3c55d645eeb175e440042
+DIST oidn-2.3.2.tar.gz 75315672 BLAKE2B d271a296ee8f72493ad109e1e13dc8142f8e27ed878e08dc9baa7fc04e936ef8604bedf7fa65df278758f2c12c9e66cd517aab16b422b2b99d68aff6c7e56587 SHA512 bba24f712bdd9f35a4e2f60a0b86b1b48eac40bf40a898cd8c2a7571e52f5d0b0055fcd8b6647a9ff062e2680ded63b66aa916a5a4b428de114c0a218f7783ea

diff --git a/media-libs/oidn/files/oidn-2.3.1-composable-kernel-api.patch b/media-libs/oidn/files/oidn-2.3.1-composable-kernel-api.patch
new file mode 100644
index 000000000000..80f6bf5e9f26
--- /dev/null
+++ b/media-libs/oidn/files/oidn-2.3.1-composable-kernel-api.patch
@@ -0,0 +1,28 @@
+diff --git a/devices/hip/ck_conv_wmma.cpp b/devices/hip/ck_conv_wmma.cpp
+index 144374d..1bb2f7f 100644
+--- a/devices/hip/ck_conv_wmma.cpp
++++ b/devices/hip/ck_conv_wmma.cpp
+@@ -48,19 +48,20 @@ OIDN_NAMESPACE_BEGIN
+         OutLayout,               // ELayout
+         InDataType,              // ADataType
+         WeiDataType,             // BDataType
+-        ck::Tuple<BiasDataType>, // DsDataType
+-        OutDataType,             // EDataType
+         AccDataType,             // AccDataType
+         CShuffleDataType,        // CShuffleDataType
++        ck::Tuple<BiasDataType>, // DsDataType
++        OutDataType,             // EDataType
+         InElementOp,             // AElementwiseOperation
+         WeiElementOp,            // BElementwiseOperation
+         OutElementOp,            // CDEElementwiseOperation
+         ConvSpec,                // ConvForwardSpecialization
+         GemmSpec,                // GemmSpecialization
++        1,                       // NumGemmKPrefetchStage
+         256,                     // BlockSize
+         128,                     // MPerBlock
+         64,                      // NPerBlock
+-        4,                       // K0PerBlock
++        32,                      // KPerBlock
+         8,                       // K1
+         16,                      // MPerWMMA
+         16,                      // NPerWMMA

diff --git a/media-libs/oidn/files/oidn-2.3.1-system-composable-kernel.patch b/media-libs/oidn/files/oidn-2.3.1-system-composable-kernel.patch
new file mode 100644
index 000000000000..e1b96181ec91
--- /dev/null
+++ b/media-libs/oidn/files/oidn-2.3.1-system-composable-kernel.patch
@@ -0,0 +1,199 @@
+diff --git a/devices/hip/CMakeLists.txt b/devices/hip/CMakeLists.txt
+index e9a9bec..b738d5b 100644
+--- a/devices/hip/CMakeLists.txt
++++ b/devices/hip/CMakeLists.txt
+@@ -53,12 +53,6 @@ set_target_properties(OpenImageDenoise_device_hip PROPERTIES
+   CXX_STANDARD 17
+ )
+ 
+-target_include_directories(OpenImageDenoise_device_hip
+-  PRIVATE
+-    "${OIDN_ROOT_SOURCE_DIR}/external/composable_kernel/include"
+-    "${OIDN_ROOT_SOURCE_DIR}/external/composable_kernel/library/include"
+-)
+-
+ set_source_files_properties(
+   ck_conv_wmma.cpp
+   PROPERTIES COMPILE_FLAGS "-mcumode -mno-wavefrontsize64" # Navi3x optimizations
+diff --git a/devices/hip/ck_conv_dl.cpp b/devices/hip/ck_conv_dl.cpp
+index 1aacfe8..e99da53 100644
+--- a/devices/hip/ck_conv_dl.cpp
++++ b/devices/hip/ck_conv_dl.cpp
+@@ -3,7 +3,7 @@
+ 
+ #include "hip_conv.h"
+ #include "ck_conv.h"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ OIDN_NAMESPACE_BEGIN
+ 
+diff --git a/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp16.cpp b/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp16.cpp
+index db5a7f0..2f384cb 100644
+--- a/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp16.cpp
++++ b/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp16.cpp
+@@ -3,7 +3,7 @@
+ 
+ #include "convnd_fwd_dl_common.hpp"
+ 
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ #include "ck/library/utility/convolution_host_tensor_descriptor_helper.hpp"
+ 
+diff --git a/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp32.cpp b/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp32.cpp
+index 964d784..aa56666 100644
+--- a/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp32.cpp
++++ b/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_fp32.cpp
+@@ -3,7 +3,7 @@
+ 
+ #include "convnd_fwd_dl_common.hpp"
+ 
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ #include "ck/library/utility/convolution_host_tensor_descriptor_helper.hpp"
+ 
+diff --git a/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_int8.cpp b/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_int8.cpp
+index b0cd88f..15b554c 100644
+--- a/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_int8.cpp
++++ b/external/composable_kernel/example/09_convnd_fwd/convnd_fwd_dl_int8.cpp
+@@ -3,7 +3,7 @@
+ 
+ #include "convnd_fwd_dl_common.hpp"
+ 
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ #include "ck/library/utility/convolution_host_tensor_descriptor_helper.hpp"
+ 
+diff --git a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perchannel_quantization_int8.cpp b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perchannel_quantization_int8.cpp
+index 5c445d9..49d2ba3 100644
+--- a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perchannel_quantization_int8.cpp
++++ b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perchannel_quantization_int8.cpp
+@@ -2,7 +2,7 @@
+ // Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
+ 
+ #include "common.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ using InDataType           = int8_t;
+ using WeiDataType          = int8_t;
+diff --git a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perlayer_quantization_int8.cpp b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perlayer_quantization_int8.cpp
+index 0ff85f0..661d744 100644
+--- a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perlayer_quantization_int8.cpp
++++ b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_relu_perlayer_quantization_int8.cpp
+@@ -2,7 +2,7 @@
+ // Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
+ 
+ #include "common.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ using InDataType   = int8_t;
+ using WeiDataType  = int8_t;
+diff --git a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perchannel_quantization_int8.cpp b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perchannel_quantization_int8.cpp
+index f8f996d..65cded3 100644
+--- a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perchannel_quantization_int8.cpp
++++ b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perchannel_quantization_int8.cpp
+@@ -2,7 +2,7 @@
+ // Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
+ 
+ #include "common.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ using InDataType           = int8_t;
+ using WeiDataType          = int8_t;
+diff --git a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perlayer_quantization_int8.cpp b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perlayer_quantization_int8.cpp
+index 3b25fec..ca5f217 100644
+--- a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perlayer_quantization_int8.cpp
++++ b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_bias_tanh_perlayer_quantization_int8.cpp
+@@ -2,7 +2,7 @@
+ // Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
+ 
+ #include "common.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ using InDataType   = int8_t;
+ using WeiDataType  = int8_t;
+diff --git a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perchannel_quantization_int8.cpp b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perchannel_quantization_int8.cpp
+index a98a1e2..88b9ccc 100644
+--- a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perchannel_quantization_int8.cpp
++++ b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perchannel_quantization_int8.cpp
+@@ -2,7 +2,7 @@
+ // Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
+ 
+ #include "common.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ using InDataType           = int8_t;
+ using WeiDataType          = int8_t;
+diff --git a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perlayer_quantization_int8.cpp b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perlayer_quantization_int8.cpp
+index 262594d..f5678e7 100644
+--- a/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perlayer_quantization_int8.cpp
++++ b/external/composable_kernel/example/40_conv2d_fwd_quantization/conv2d_fwd_dl_perlayer_quantization_int8.cpp
+@@ -2,7 +2,7 @@
+ // Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
+ 
+ #include "common.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ using InDataType  = int8_t;
+ using WeiDataType = int8_t;
+diff --git a/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f16_instance.cpp b/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f16_instance.cpp
+index fc18b3c..020d93e 100644
+--- a/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f16_instance.cpp
++++ b/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f16_instance.cpp
+@@ -5,7 +5,7 @@
+ 
+ #include "ck/ck.hpp"
+ #include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ #include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
+ #include "ck/tensor_operation/gpu/device/convolution_forward_specialization.hpp"
+ #include "ck/tensor_operation/gpu/device/gemm_specialization.hpp"
+diff --git a/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f32_instance.cpp b/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f32_instance.cpp
+index 648b396..42825ce 100644
+--- a/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f32_instance.cpp
++++ b/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_f32_instance.cpp
+@@ -5,7 +5,7 @@
+ 
+ #include "ck/ck.hpp"
+ #include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ #include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
+ #include "ck/tensor_operation/gpu/device/convolution_forward_specialization.hpp"
+ #include "ck/tensor_operation/gpu/device/gemm_specialization.hpp"
+diff --git a/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_int8_instance.cpp b/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_int8_instance.cpp
+index 1cb5d06..ab74235 100644
+--- a/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_int8_instance.cpp
++++ b/external/composable_kernel/library/src/tensor_operation_instance/gpu/grouped_conv2d_fwd/device_grouped_conv2d_fwd_dl_gnhwc_gkyxc_gnhwk_int8_instance.cpp
+@@ -5,7 +5,7 @@
+ 
+ #include "ck/ck.hpp"
+ #include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ #include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
+ #include "ck/tensor_operation/gpu/device/convolution_forward_specialization.hpp"
+ #include "ck/tensor_operation/gpu/device/gemm_specialization.hpp"
+diff --git a/external/composable_kernel/library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_dl_int8_instance.hpp b/external/composable_kernel/library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_dl_int8_instance.hpp
+index 3c4987f..62ee1a4 100644
+--- a/external/composable_kernel/library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_dl_int8_instance.hpp
++++ b/external/composable_kernel/library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_dl_int8_instance.hpp
+@@ -4,7 +4,7 @@
+ #pragma once
+ 
+ #include "conv2d_quantization_common.hpp"
+-#include "ck/tensor_operation/gpu/device/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
++#include "ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_dl_multiple_d_nhwc_kyxc_nhwk.hpp"
+ 
+ namespace ck {
+ namespace tensor_operation {

diff --git a/media-libs/oidn/oidn-2.3.1.ebuild b/media-libs/oidn/oidn-2.3.2.ebuild
similarity index 64%
rename from media-libs/oidn/oidn-2.3.1.ebuild
rename to media-libs/oidn/oidn-2.3.2.ebuild
index e461dfc6169f..c8e068d4a987 100644
--- a/media-libs/oidn/oidn-2.3.1.ebuild
+++ b/media-libs/oidn/oidn-2.3.2.ebuild
@@ -4,16 +4,17 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{10..13} )
-ROCM_VERSION=5.7
+ROCM_VERSION=6.3
 
 inherit cmake cuda python-any-r1 rocm
 
 DESCRIPTION="Intel® Open Image Denoise library"
 HOMEPAGE="https://www.openimagedenoise.org https://github.com/RenderKit/oidn"
 
-if [[ ${PV} = *9999 ]]; then
+if [[ ${PV} = *9999* ]]; then
 	EGIT_REPO_URI="https://github.com/RenderKit/oidn.git"
 	EGIT_BRANCH="master"
+	EGIT_LFS="1"
 	inherit git-r3
 else
 	SRC_URI="https://github.com/RenderKit/${PN}/releases/download/v${PV}/${P}.src.tar.gz -> ${P}.tar.gz"
@@ -21,18 +22,18 @@ else
 fi
 
 LICENSE="Apache-2.0"
-SLOT="0"
+SLOT="0/${PV}"
+IUSE="apps cuda hip openimageio test"
 REQUIRED_USE="
 	test? ( apps )
 "
-IUSE="apps cuda hip openimageio test"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
 	dev-cpp/tbb:=
 	dev-lang/ispc
-	cuda? ( dev-util/nvidia-cuda-toolkit )
-	hip? ( dev-util/hip )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	hip? ( dev-util/hip:= )
 	openimageio? ( media-libs/openimageio:= )
 "
 DEPEND="${RDEPEND}"
@@ -40,7 +41,6 @@ BDEPEND="${PYTHON_DEPS}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-2.2.2-amdgpu-targets.patch"
-	"${FILESDIR}/${PN}-2.3.1-hip-clang-19.patch"
 )
 
 src_prepare() {
@@ -49,12 +49,20 @@ src_prepare() {
 	fi
 
 	if use hip; then
-		# Fix Clang 19 error
-		# Bug: https://github.com/RenderKit/oidn/issues/250
-		sed -i "s/.template Run(/.template Run<>(/g" \
-			external/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_wmma.hpp \
-			external/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_xdlops_skip_b_lds.hpp \
-			external/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_xdlops.hpp || die
+		if has_version ">=dev-util/hip-6.2"; then
+			eapply "${FILESDIR}/${PN}-2.3.1-hip-clang-19.patch"
+			eapply "${FILESDIR}/${PN}-2.3.1-system-composable-kernel.patch"
+			eapply "${FILESDIR}/${PN}-2.3.1-composable-kernel-api.patch"
+		fi
+
+		if has_version "dev-util/hip[llvm_slot_19]"; then
+			# Fix Clang 19 error
+			# Bug: https://github.com/RenderKit/oidn/issues/250
+			sed -i "s/.template Run(/.template Run<>(/g" \
+				external/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_wmma.hpp \
+				external/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_xdlops_skip_b_lds.hpp \
+				external/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_xdlops.hpp || die
+		fi
 
 		# https://bugs.gentoo.org/930391
 		sed "/-Wno-unused-result/s:): --rocm-path=${EPREFIX}/usr):" \
@@ -65,6 +73,9 @@ src_prepare() {
 	# do not fortify source -- bug 895018
 	sed -e "s/-D_FORTIFY_SOURCE=2//g" -i {cmake/oidn_platform,external/mkl-dnn/cmake/SDL}.cmake || die
 
+	# 950261
+	sed -e "/set(CMAKE_CXX_STANDARD /s/^/# /" -i cmake/oidn_platform.cmake || die
+
 	cmake_src_prepare
 }
 
@@ -89,7 +100,7 @@ src_configure() {
 	if use hip; then
 		mycmakeargs+=(
 			-DROCM_PATH="${EPREFIX}/usr"
-			-DOIDN_DEVICE_HIP_COMPILER="${ESYSROOT}/usr/bin/hipcc"
+			-DOIDN_DEVICE_HIP_COMPILER="${ESYSROOT}/usr/bin/hipcc" # use HIPHOSTCOMPILER
 			-DAMDGPU_TARGETS="$(get_amdgpu_flags)"
 		)
 	fi
@@ -98,7 +109,7 @@ src_configure() {
 }
 
 src_test() {
-	"${BUILD_DIR}"/oidnTest || die "There were test faliures!"
+	"${BUILD_DIR}"/oidnTest || die "There were test failures!"
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-07 13:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 13:22 [gentoo-commits] repo/gentoo:master commit in: media-libs/oidn/files/, media-libs/oidn/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox