CommandPool Class — pytorch Architecture
Architecture documentation for the CommandPool class in Command.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/vulkan/api/Command.h lines 133–162
class CommandPool final {
public:
explicit CommandPool(VkDevice, const uint32_t, const CommandPoolConfig&);
CommandPool(const CommandPool&) = delete;
CommandPool& operator=(const CommandPool&) = delete;
CommandPool(CommandPool&&) = delete;
CommandPool& operator=(CommandPool&&) = delete;
~CommandPool();
private:
VkDevice device_;
uint32_t queue_family_idx_;
VkCommandPool pool_;
CommandPoolConfig config_;
// New Buffers
std::mutex mutex_;
std::vector<VkCommandBuffer> buffers_;
size_t in_use_;
public:
CommandBuffer get_new_cmd(bool reusable = false);
void flush();
private:
void allocate_new_batch(const uint32_t);
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free