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

Method evalAsync

src/Sequence.cpp:108–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108std::shared_ptr<Sequence>
109Sequence::evalAsync()
110{
111 if (this->isRecording()) {
112 this->end();
113 }
114
115 if (this->mIsRunning) {
116 throw std::runtime_error(
117 "Kompute Sequence evalAsync called when an eval async was "
118 "called without successful wait");
119 }
120
121 this->mIsRunning = true;
122
123 for (size_t i = 0; i < this->mOperations.size(); i++) {
124 this->mOperations[i]->preEval(*this->mCommandBuffer);
125 }
126
127 vk::SubmitInfo submitInfo(
128 0, nullptr, nullptr, 1, this->mCommandBuffer.get());
129
130 this->mFence = this->mDevice->createFence(vk::FenceCreateInfo());
131
132 KP_LOG_DEBUG(
133 "Kompute sequence submitting command buffer into compute queue");
134
135 this->mComputeQueue->submit(1, &submitInfo, this->mFence);
136
137 return shared_from_this();
138}
139
140std::shared_ptr<Sequence>
141Sequence::evalAsync(std::shared_ptr<OpBase> op)

Callers 3

evalMethod · 0.95
PYBIND11_MODULEFunction · 0.45
TESTFunction · 0.45

Calls 6

isRecordingMethod · 0.95
endMethod · 0.95
clearMethod · 0.95
recordMethod · 0.95
sizeMethod · 0.80
preEvalMethod · 0.45

Tested by 1

TESTFunction · 0.36