MCPcopy Create free account
hub / github.com/KomputeProject/kompute / evalAwait

Method evalAwait

src/Sequence.cpp:149–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149std::shared_ptr<Sequence>
150Sequence::evalAwait(uint64_t waitFor)
151{
152 if (!this->mIsRunning) {
153 KP_LOG_WARN("Kompute Sequence evalAwait called without existing eval");
154 return shared_from_this();
155 }
156
157 vk::Result result =
158 this->mDevice->waitForFences(1, &this->mFence, VK_TRUE, waitFor);
159 this->mDevice->destroy(
160 this->mFence, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
161
162 this->mIsRunning = false;
163
164 if (result == vk::Result::eTimeout) {
165 KP_LOG_WARN("Kompute Sequence evalAwait reached timeout of {}",
166 waitFor);
167 return shared_from_this();
168 }
169
170 for (size_t i = 0; i < this->mOperations.size(); i++) {
171 this->mOperations[i]->postEval(*this->mCommandBuffer);
172 }
173
174 return shared_from_this();
175}
176
177bool
178Sequence::isRunning() const

Callers 5

PYBIND11_MODULEFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
evalMethod · 0.80

Calls 3

sizeMethod · 0.80
destroyMethod · 0.45
postEvalMethod · 0.45

Tested by 3

TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64