diff --git a/.github/workflows/build-steps.yml b/.github/workflows/build-steps.yml index e9c93cd118..603442a1c2 100644 --- a/.github/workflows/build-steps.yml +++ b/.github/workflows/build-steps.yml @@ -88,7 +88,9 @@ jobs: runs-on: ${{ inputs.runner }} container: image: ${{ inputs.container }} - + options: ${{ (contains(inputs.runner, 'gpu') && '-e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility --gpus all') || '-e A=x' }} + # ^^ need extra options on the GPU runners to ensure OptiX is visible + # in the container. env: CXX: ${{inputs.cxx_compiler}} CC: ${{inputs.cc_compiler}} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab5c1b7221..e48570071d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ permissions: read-all jobs: aswf-old: - if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') }} + if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') && ! contains(github.ref, 'optix-only') }} name: "VFX${{matrix.vfxyear}} ${{matrix.desc}}" strategy: fail-fast: false @@ -203,7 +203,7 @@ jobs: linux: - if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') }} + if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') && ! contains(github.ref, 'optix-only') }} name: "${{matrix.desc}}" uses: ./.github/workflows/build-steps.yml with: @@ -250,20 +250,7 @@ jobs: pybind11_ver: v2.9.0 simd: avx2,f16c batched: b8_AVX2 - - desc: VP2023 GPU Cuda11 gcc11/C++17 llvm15 py3.10 OIIO-main avx2 - nametag: linux-optix7-2023 - runner: ubuntu-latest - container: aswftesting/ci-osl:2023-clang15 - cxx_std: 17 - openimageio_ver: main - python_ver: "3.10" - pybind11_ver: v2.10.0 - simd: avx2,f16c - skip_tests: 1 - setenvs: export OSL_CMAKE_FLAGS="-DOSL_USE_OPTIX=1" - OPTIX_VERSION=7.0.0 - OPENIMAGEIO_CMAKE_FLAGS=-DBUILD_FMT_VERSION=9.1.0 - - desc: VP2024 gcc11/C++17 llvm17 py3.11 boost1.82 oiio-rel avx2 + - desc: VP2024 gcc11/C++17 llvm17 py3.11 oiio-rel avx2 nametag: linux-vfx2024 runner: ubuntu-latest container: aswftesting/ci-osl:2024-clang17 @@ -486,7 +473,7 @@ jobs: macos: - if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'linux-only') }} + if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'linux-only') && ! contains(github.ref, 'optix-only') }} name: "${{matrix.desc}}" uses: ./.github/workflows/build-steps.yml with: @@ -555,7 +542,7 @@ jobs: windows: - if: ${{ ! contains(github.ref, 'linux-only') && ! contains(github.ref, 'macos-only') }} + if: ${{ ! contains(github.ref, 'linux-only') && ! contains(github.ref, 'macos-only') && ! contains(github.ref, 'optix-only') }} name: "${{matrix.desc}}" uses: ./.github/workflows/build-steps.yml with: @@ -620,3 +607,59 @@ jobs: OSL_CMAKE_FLAGS="-DUSE_LLVM_BTCODE=ON" PUGIXML_VERSION=v1.14 OpenImageIO_BUILD_MISSING_DEPS="Freetype;TIFF;libdeflate;libjpeg-turbo" + + + optix-gpu: + if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') }} + name: "${{matrix.desc}}" + uses: ./.github/workflows/build-steps.yml + with: + nametag: ${{ matrix.nametag || 'unnamed!' }} + runner: ${{ matrix.runner || 'ubuntu-latest' }} + container: ${{ matrix.container }} + cc_compiler: ${{ matrix.cc_compiler || 'gcc' }} + cxx_compiler: ${{ matrix.cxx_compiler || 'g++' }} + cxx_std: ${{ matrix.cxx_std || '17' }} + build_type: ${{ matrix.build_type || 'Release' }} + depcmds: ${{ matrix.depcmds }} + extra_artifacts: ${{ matrix.extra_artifacts }} + fmt_ver: ${{ matrix.fmt_ver }} + opencolorio_ver: ${{ matrix.opencolorio_ver }} + openexr_ver: ${{ matrix.openexr_ver }} + openimageio_ver: ${{ matrix.openimageio_ver }} + pybind11_ver: ${{ matrix.pybind11_ver }} + python_ver: ${{ matrix.python_ver }} + setenvs: ${{ matrix.setenvs }} + simd: ${{ matrix.simd }} + batched: ${{ matrix.batched }} + skip_build: ${{ matrix.skip_build }} + skip_tests: ${{ matrix.skip_tests }} + abi_check: ${{ matrix.abi_check }} + build_docs: ${{ matrix.build_docs }} + generator: ${{ matrix.generator }} + ctest_args: ${{ matrix.ctest_args }} + ctest_test_timeout: ${{ matrix.ctest_test_timeout || '800' }} + coverage: ${{ matrix.coverage || 0 }} + sonar: ${{ matrix.sonar || 0 }} + llvm_action_ver: ${{ matrix.llvm_action_ver }} + clang_format: ${{ matrix.clang_format }} + strategy: + fail-fast: false + matrix: + include: + - desc: OptiX ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'GPU') || 'build only' }} VP2025 gcc11/C++17 llvm18 py3.11 oiio-rel avx2 + # ^^ This will run on GPU when on the ASWF account, but is a + # "build only" test on user accounts. Similar conditionals below + # select the right runner type and whether tests are run. + nametag: linux-optix-vfx2025 + runner: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-gpu-t4-4c-16g-176h') || 'ubuntu-latest' }} + container: aswf/ci-osl:2025-clang18 + cxx_std: 17 + python_ver: "3.11" + pybind11_ver: v2.11.1 + simd: avx2,f16c + skip_tests: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && '0') || '1' }} + setenvs: export OSL_CMAKE_FLAGS="-DOSL_USE_OPTIX=1" + OPTIX_VERSION=8.0.0 + OPENIMAGEIO_CMAKE_FLAGS=-DBUILD_FMT_VERSION=9.1.0 + CTEST_EXCLUSIONS="broken|render-microfacet|example-cuda|python-oslquery" diff --git a/src/build-scripts/gh-installdeps.bash b/src/build-scripts/gh-installdeps.bash index 5b3c2c53e9..a6d5239911 100755 --- a/src/build-scripts/gh-installdeps.bash +++ b/src/build-scripts/gh-installdeps.bash @@ -152,6 +152,9 @@ if [[ "$OPTIX_VERSION" != "" ]] ; then echo "Requested OPTIX_VERSION = '${OPTIX_VERSION}' from ${OPTIXREPO}" export OptiX_ROOT=$LOCAL_DEPS_DIR/dist/optix-dev git clone -b v${OPTIX_VERSION} ${OPTIXREPO} ${OptiX_ROOT} + export PATH=$PATH:/usr/local/cuda-12/bin + export LD_LIBRARY_PATH=/usr/local/cuda-12/lib64:$LD_LIBRARY_PATH + find / -name "*nv*so" -print || true fi diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake index 8016d8e5a1..04d6cb1d81 100644 --- a/src/cmake/externalpackages.cmake +++ b/src/cmake/externalpackages.cmake @@ -201,6 +201,7 @@ if (OSL_USE_OPTIX) target_link_libraries (${TARGET} PRIVATE ${CUDA_LIBRARIES} ${CUDA_EXTRA_LIBS} ${OPTIX_LIBRARIES} ${OPTIX_EXTRA_LIBS}) endfunction() else () + message(STATUS "CUDA/OptiX support disabled") function (osl_optix_target TARGET) endfunction() endif () diff --git a/testsuite/render-mx-generalized-schlick/run.py b/testsuite/render-mx-generalized-schlick/run.py index e899d57f0d..22c565127a 100755 --- a/testsuite/render-mx-generalized-schlick/run.py +++ b/testsuite/render-mx-generalized-schlick/run.py @@ -6,7 +6,7 @@ failthresh = 0.01 failpercent = 1 -allowfailures = 2 +allowfailures = 5 idiff_program = "idiff" outputs = [ "out.exr" ]