You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default construct QueryPool with nonzero values (#3721)
Summary:
Pull Request resolved: #3721
**We must bugfix this first to unblock either dumping querypool directly after inference or SDK development**
Currently, if you try to init QueryPool during inference, it will crash at `vkCreateQueryPool`. Some debugging revealed in the test binary, it will crash only on VulkanComputeGraphTest but not VulkanComputeAPITest.
It is because the `Context` instance is initialized in two different ways and then `QueryPoolConfig` is then initialized in two different ways.
1. Static singleton https://fburl.com/code/iqo8xcg2 with above nonzero max query count and the compile time flag to change the query pool. We don't use this for model inference.
2. Explicit constructor https://fburl.com/code/m1xga4ra, invoked in `VulkanBackend::Init()` https://fburl.com/code/4j8y3pzu which goes through default construction of `GraphConfig`, default construction of `QueryPoolConfig`, leading to zero max query count and crash. We use this for model inference.
3. This should be probably be unified, as it was extremely confusing to have the compile time flag work in non inference cases but not in inference case, and explicit const struct construction happens in the former vs completely default struct construction in the latter.
4. A quick solution to unblock. `QueryPoolConfig` has default init values of the compile time flags.
Reviewed By: SS-JIA
Differential Revision: D57735873
fbshipit-source-id: e04325f34f68576db462b3003ddfffefee7fc7f0
0 commit comments