Added template function for algorithm on manager
Signed-off-by: Alejandro Saucedo <axsauze@gmail.com>
This commit is contained in:
parent
2e1275e085
commit
c23573eb47
3 changed files with 68 additions and 36 deletions
|
|
@ -422,32 +422,6 @@ Manager::createDevice(const std::vector<uint32_t>& familyQueueIndices,
|
|||
KP_LOG_DEBUG("Kompute Manager compute queue obtained");
|
||||
}
|
||||
|
||||
// TODO: Update to template
|
||||
std::shared_ptr<Algorithm>
|
||||
Manager::algorithm(const std::vector<std::shared_ptr<Tensor>>& tensors,
|
||||
const std::vector<uint32_t>& spirv,
|
||||
const Workgroup& workgroup,
|
||||
const Constants& specializationConstants,
|
||||
const Constants& pushConstants)
|
||||
{
|
||||
|
||||
KP_LOG_DEBUG("Kompute Manager algorithm creation triggered");
|
||||
|
||||
std::shared_ptr<Algorithm> algorithm{ new kp::Algorithm(
|
||||
this->mDevice,
|
||||
tensors,
|
||||
spirv,
|
||||
workgroup,
|
||||
specializationConstants,
|
||||
pushConstants) };
|
||||
|
||||
if (this->mManageResources) {
|
||||
this->mManagedAlgorithms.push_back(algorithm);
|
||||
}
|
||||
|
||||
return algorithm;
|
||||
}
|
||||
|
||||
std::shared_ptr<Sequence>
|
||||
Manager::sequence(uint32_t queueIndex, uint32_t totalTimestamps)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue