Repository navigation
Conversation
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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 forosl:simdbuild: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 inhw:batched-- the subset of those this hardware can runAdd
testshade --buildinfo, which prints those attributes plus the running hardware (and GPU, for OptiX builds). It mirrorsoiiotool --buildinfo. For example: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:
Assisted-by: Claude Code / Claude Opus 5.5