I'm using "cl_cache" method to reduce model loading time for GPU backend case, and wonder whether we can get benefit of using "cl_cache" for following case, too.
Case #1: Single thread operation and creating multiple instances: Can 2nd/3rd/.. instances use cl_cache created by 1st instances to reduce model loading time?
Case #2: Multiple thread operation: Can 2nd/3rd./.. thread use cl_cache created by 1st thread?
Here is faq explaining current limitations:
In general cl_cache is not thread safe.
If you synchronize your application properly , you may use cl_cache populated from thread #1 in other threads.
Generally cl_cache has thread safety issues while it is being populated, if you do one threaded run of your application that populates the whole cl_cache, then for subsequent runs you should be able to read it from multiple threads without locks.