mirror of
https://github.com/nomic-ai/kompute.git
synced 2026-05-11 17:09:59 +00:00
Updated algorithm to have option to build for both resultvalue and result
This commit is contained in:
@@ -264,9 +264,20 @@ Algorithm::createPipeline(std::vector<uint32_t> specializationData)
|
||||
&pipelineCacheInfo, nullptr, this->mPipelineCache.get());
|
||||
this->mFreePipelineCache = true;
|
||||
|
||||
#ifdef KOMPUTE_CREATE_PIPELINE_RESULT_VALUE
|
||||
vk::ResultValue<vk::Pipeline> pipelineResult =
|
||||
this->mDevice->createComputePipeline(*this->mPipelineCache,
|
||||
pipelineInfo);
|
||||
|
||||
if (pipelineResult.result != vk::Result::eSuccess) {
|
||||
throw std::runtime_error("Failed to create pipeline result: " +
|
||||
vk::to_string(pipelineResult.result));
|
||||
}
|
||||
#else
|
||||
vk::Pipeline pipelineResult =
|
||||
this->mDevice->createComputePipeline(*this->mPipelineCache, pipelineInfo);
|
||||
this->mFreePipeline = true;
|
||||
#endif
|
||||
|
||||
this->mFreePipeline = true;
|
||||
this->mPipeline = std::make_shared<vk::Pipeline>(pipelineResult);
|
||||
|
||||
Reference in New Issue
Block a user