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

Method record

src/OpTensorSyncLocal.cpp:27–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void
28OpTensorSyncLocal::record(const vk::CommandBuffer& commandBuffer)
29{
30 KP_LOG_DEBUG("Kompute OpTensorSyncLocal record called");
31
32 for (size_t i = 0; i < this->mTensors.size(); i++) {
33 if (this->mTensors[i]->tensorType() == Tensor::TensorTypes::eDevice) {
34
35 this->mTensors[i]->recordPrimaryBufferMemoryBarrier(
36 commandBuffer,
37 vk::AccessFlagBits::eShaderWrite,
38 vk::AccessFlagBits::eTransferRead,
39 vk::PipelineStageFlagBits::eComputeShader,
40 vk::PipelineStageFlagBits::eTransfer);
41
42 this->mTensors[i]->recordCopyFromDeviceToStaging(commandBuffer);
43
44 this->mTensors[i]->recordPrimaryBufferMemoryBarrier(
45 commandBuffer,
46 vk::AccessFlagBits::eTransferWrite,
47 vk::AccessFlagBits::eHostRead,
48 vk::PipelineStageFlagBits::eTransfer,
49 vk::PipelineStageFlagBits::eHost);
50 }
51 }
52}
53
54void
55OpTensorSyncLocal::preEval(const vk::CommandBuffer& /*commandBuffer*/)

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
tensorTypeMethod · 0.80

Tested by

no test coverage detected