Skip to content

Conversation

@chellmuth
Copy link
Owner

Description

Tests

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • My code follows the prevailing code style of this project. If I haven't
    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.

std::string& value) const
{
return false;
}
Copy link
Owner Author

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);
Copy link
Owner Author

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);
Copy link
Owner Author

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.

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.

2 participants