diff options
| author | Yong He <yonghe@outlook.com> | 2023-05-09 18:00:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-09 18:00:48 -0700 |
| commit | ddebd60853b3f34bfd8e89de804fd15808abf75d (patch) | |
| tree | d5d686843bc2c67e493693376a0170857998c077 /source/slang/slang.cpp | |
| parent | 38ed03a7203baacf36fca62539ac74fd45ed42d2 (diff) | |
Various fixes for autodiff and slangpy. (#2876)
* Various fixes for autodiff and slangpy.
* Fix cuda code gen for `select`.
* Fix getBuildTagString().
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index a1c8f9b03..f2598786f 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -125,6 +125,14 @@ namespace Slang { const char* getBuildTagString() { + if (UnownedStringSlice(SLANG_TAG_VERSION) == "unknown") + { + // If the tag is unknown, then we will try to get the timestamp of the shared library + // and use that as the version string, so that we can at least return something + // that uniquely identifies the build. + static String timeStampString = String(SharedLibraryUtils::getSharedLibraryTimestamp((void*)spCreateSession)); + return timeStampString.getBuffer(); + } return SLANG_TAG_VERSION; } |
