-
Notifications
You must be signed in to change notification settings - Fork 0
OSL Cache v0 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
OSL Cache v0 #2
Conversation
| std::string& value) const | ||
| { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The external cache API. Should the names include "optix" or be generic?
| std::ostringstream out; | ||
| out.imbue(std::locale::classic()); // force C locale | ||
| out.precision(9); | ||
| lock_guard lock(m_mutex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lock caused me some trouble. ShadingSystemImpl::optimize_group grabs the same lock, and then calls serialize, so we deadlock without a change.
This is a quick fix, a recursive mutex would be another. I don't understand the locking scheme well enough to know the right call here.
| optix_cache_unwrap(const std::string& cache_value, std::string& ptx, | ||
| size_t& groupdata_size); | ||
| std::string | ||
| optix_cache_wrap(const std::string& ptx, size_t groupdata_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't sure where to put these functions. They should be paired up, but one is used in llvm_instance and the other in shadingsys.
Description
Tests
Checklist:
already run clang-format v17 before submitting, I definitely will look at
the CI test that runs clang-format and fix anything that it highlights as
being nonconforming.