Skip to content

ci: testshade --buildinfo, and show it in the GHA summary - #2186

Open
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-depveroutput
Open

lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-depveroutput

Conversation

@lgritz

@lgritz lgritz commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Add read-only ShadingSystem attributes describing how OSL was built, so any app linking liboslexec can retrieve them. These are modeled on OIIO's attributes of the same names:

  • build:platform -- e.g. "MacOS/ARM"
  • build:compiler -- e.g. "gcc 11.2"
  • build:simd -- synonym for osl:simd
  • build:dependencies -- semicolon-separated "name version" for every dependency the build looked for (from CMake, via a configured private header, buildopts.h)
  • build:batched -- batched SIMD targets compiled in
  • hw:batched -- the subset of those this hardware can run

Add testshade --buildinfo, which prints those attributes plus the running hardware (and GPU, for OptiX builds). It mirrors oiiotool --buildinfo. For example:

OSL 1.16.0.0dev | Linux/x86_64
    Build compiler: gcc 11.2 | C++17/201703
    HW features enabled at build: sse2,sse3,ssse3,sse41,sse42,avx,avx2,f16c
    Back ends: x86_64 single, batched b8_AVX2
    Dependencies: ZLIB 1.2.11, Imath 3.1.9, OpenImageIO 3.0.11.0, pugixml 1.16, LLVM 15.0.7, partio, Python3 3.10.11, pybind11 2.9.0, Qt6 NONE, Qt5 5.15.9, Robinmap, BISON 3.0.4, FLEX 2.6.1
    Running on: 4 cores, 15.6 GB, SIMD sse2,sse3,ssse3,sse41,sse42,avx,avx2,avx512f,avx512dq,avx512ifma,avx512cd,avx512bw,avx512vl,fma,f16c,popcnt,rdrand

ci-test.bash appends this to $GITHUB_STEP_SUMMARY, as OIIO does (OIIO PR 5453), so each CI job's toolchain and dependencies are visible at a glance on the workflow summary page.

Also fix bugs in ShadingSystem::getattribute:

  • "hw:simd" queried the nonexistent OIIO attribute "hw:string".
  • "osl:simd" never reported neon.
  • "osl:cuda_version" and "osl:optix_version" returned a raw char* rather than a ustring's chars, so retrieving them as a ustring gave garbage.

Assisted-by: Claude Code / Claude Opus 5.5

Add read-only ShadingSystem attributes describing how OSL was built,
so any app linking liboslexec can retrieve them. These are modeled on
OIIO's attributes of the same names:

* `build:platform` -- e.g. "MacOS/ARM"
* `build:compiler` -- e.g. "gcc 11.2"
* `build:simd` -- synonym for `osl:simd`
* `build:dependencies` -- semicolon-separated "name version" for every
  dependency the build looked for (from CMake, via a configured private
  header, buildopts.h)
* `build:batched` -- batched SIMD targets compiled in
* `hw:batched` -- the subset of those this hardware can run

Add `testshade --buildinfo`, which prints those attributes plus the
running hardware (and GPU, for OptiX builds). It mirrors
`oiiotool --buildinfo`. For example:

```
OSL 1.16.0.0dev | Linux/x86_64
    Build compiler: gcc 11.2 | C++17/201703
    HW features enabled at build: sse2,sse3,ssse3,sse41,sse42,avx,avx2,f16c
    Back ends: x86_64 single, batched b8_AVX2
    Dependencies: ZLIB 1.2.11, Imath 3.1.9, OpenImageIO 3.0.11.0, pugixml 1.16, LLVM 15.0.7, partio, Python3 3.10.11, pybind11 2.9.0, Qt6 NONE, Qt5 5.15.9, Robinmap, BISON 3.0.4, FLEX 2.6.1
    Running on: 4 cores, 15.6 GB, SIMD sse2,sse3,ssse3,sse41,sse42,avx,avx2,avx512f,avx512dq,avx512ifma,avx512cd,avx512bw,avx512vl,fma,f16c,popcnt,rdrand
```

ci-test.bash appends this to $GITHUB_STEP_SUMMARY, as OIIO does (OIIO
PR 5453), so each CI job's toolchain and dependencies are visible at a
glance on the workflow summary page.

Also fix bugs in ShadingSystem::getattribute:
* "hw:simd" queried the nonexistent OIIO attribute "hw:string".
* "osl:simd" never reported neon.
* "osl:cuda_version" and "osl:optix_version" returned a raw char*
  rather than a ustring's chars, so retrieving them as a ustring gave
  garbage.

Assisted-by: Claude Code / Claude Opus 5.5

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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.

1 participant