PipelineLayoutCache Class — pytorch Architecture
Architecture documentation for the PipelineLayoutCache class in Pipeline.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/vulkan/api/Pipeline.h lines 113–145
class PipelineLayoutCache final {
public:
explicit PipelineLayoutCache(VkDevice device);
PipelineLayoutCache(const PipelineLayoutCache&) = delete;
PipelineLayoutCache& operator=(const PipelineLayoutCache&) = delete;
PipelineLayoutCache(PipelineLayoutCache&&) noexcept;
PipelineLayoutCache& operator=(PipelineLayoutCache&&) = delete;
~PipelineLayoutCache();
using Key = VkDescriptorSetLayout;
using Value = PipelineLayout;
struct Hasher {
inline size_t operator()(VkDescriptorSetLayout descriptor_layout) const {
return std::hash<VkDescriptorSetLayout>()(descriptor_layout);
}
};
private:
// Multiple threads could potentially be adding entries into the cache, so use
// a mutex to manage access
std::mutex cache_mutex_;
VkDevice device_;
std::unordered_map<Key, Value, Hasher> cache_;
public:
VkPipelineLayout retrieve(const Key&);
void purge();
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free