Amended workgroup to std::array
This commit is contained in:
parent
7a71ff0751
commit
c8370e0a3a
5 changed files with 23 additions and 28 deletions
|
|
@ -22,11 +22,6 @@ namespace kp {
|
|||
class OpAlgoBase : public OpBase
|
||||
{
|
||||
public:
|
||||
struct KomputeWorkgroup {
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
uint32_t z;
|
||||
};
|
||||
|
||||
/**
|
||||
* Base constructor, should not be used unless explicitly intended.
|
||||
|
|
@ -49,7 +44,7 @@ class OpAlgoBase : public OpBase
|
|||
std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer,
|
||||
std::vector<std::shared_ptr<Tensor>>& tensors,
|
||||
KomputeWorkgroup komputeWorkgroup = {},
|
||||
const std::array<uint32_t, 3>& komputeWorkgroup = {},
|
||||
const std::vector<float>& specializationConstants = {});
|
||||
|
||||
/**
|
||||
|
|
@ -69,7 +64,7 @@ class OpAlgoBase : public OpBase
|
|||
std::shared_ptr<vk::CommandBuffer> commandBuffer,
|
||||
std::vector<std::shared_ptr<Tensor>>& tensors,
|
||||
std::string shaderFilePath,
|
||||
KomputeWorkgroup komputeWorkgroup = {},
|
||||
const std::array<uint32_t, 3>& komputeWorkgroup = {},
|
||||
const std::vector<float>& specializationConstants = {});
|
||||
|
||||
/**
|
||||
|
|
@ -88,7 +83,7 @@ class OpAlgoBase : public OpBase
|
|||
std::shared_ptr<vk::CommandBuffer> commandBuffer,
|
||||
std::vector<std::shared_ptr<Tensor>>& tensors,
|
||||
const std::vector<char>& shaderDataRaw,
|
||||
KomputeWorkgroup komputeWorkgroup = {},
|
||||
const std::array<uint32_t, 3>& komputeWorkgroup = {},
|
||||
const std::vector<float>& specializationConstants = {});
|
||||
|
||||
/**
|
||||
|
|
@ -137,7 +132,7 @@ class OpAlgoBase : public OpBase
|
|||
|
||||
// -------------- ALWAYS OWNED RESOURCES
|
||||
|
||||
KomputeWorkgroup mKomputeWorkgroup;
|
||||
std::array<uint32_t, 3> mKomputeWorkgroup;
|
||||
|
||||
std::string mShaderFilePath; ///< Optional member variable which can be provided for the OpAlgoBase to find the data automatically and load for processing
|
||||
std::vector<char> mShaderDataRaw; ///< Optional member variable which can be provided to contain either the raw shader content or the spirv binary content
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class OpAlgoLhsRhsOut : public OpAlgoBase
|
|||
std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer,
|
||||
std::vector<std::shared_ptr<Tensor>> tensors,
|
||||
KomputeWorkgroup komputeWorkgroup = KomputeWorkgroup());
|
||||
const std::array<uint32_t, 3>& komputeWorkgroup = {});
|
||||
|
||||
/**
|
||||
* Default destructor, which is in charge of destroying the algorithm
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class OpMult : public OpAlgoBase
|
|||
std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer,
|
||||
std::vector<std::shared_ptr<Tensor>> tensors,
|
||||
KomputeWorkgroup komputeWorkgroup = KomputeWorkgroup())
|
||||
const std::array<uint32_t, 3>& komputeWorkgroup = {})
|
||||
: OpAlgoBase(physicalDevice, device, commandBuffer, tensors, "", komputeWorkgroup)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute OpMult constructor with params");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue