mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Make partitioned post sync operations for partitioned workloads
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
86f8150dc7
commit
6b299a3ab0
@@ -37,9 +37,15 @@ ze_result_t FenceImp::queryStatus() {
|
||||
csr->downloadAllocations();
|
||||
}
|
||||
|
||||
uint64_t *hostAddr = static_cast<uint64_t *>(allocation->getUnderlyingBuffer());
|
||||
void *hostAddr = static_cast<uint64_t *>(allocation->getUnderlyingBuffer());
|
||||
uint32_t queryVal = Fence::STATE_CLEARED;
|
||||
memcpy_s(static_cast<void *>(&queryVal), sizeof(uint32_t), static_cast<void *>(hostAddr), sizeof(uint32_t));
|
||||
for (uint32_t i = 0; i < partitionCount; i++) {
|
||||
memcpy_s(static_cast<void *>(&queryVal), sizeof(uint32_t), hostAddr, sizeof(uint32_t));
|
||||
if (queryVal == Fence::STATE_CLEARED) {
|
||||
break;
|
||||
}
|
||||
hostAddr = ptrOffset(hostAddr, CommandQueueImp::addressOffset);
|
||||
}
|
||||
return queryVal == Fence::STATE_CLEARED ? ZE_RESULT_NOT_READY : ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,13 @@ struct Fence : _ze_fence_handle_t {
|
||||
return allocation->getGpuAddress();
|
||||
}
|
||||
|
||||
void setPartitionCount(uint32_t newPartitionCount) {
|
||||
partitionCount = newPartitionCount;
|
||||
}
|
||||
|
||||
protected:
|
||||
NEO::GraphicsAllocation *allocation = nullptr;
|
||||
uint32_t partitionCount = 1;
|
||||
};
|
||||
|
||||
struct FenceImp : public Fence {
|
||||
|
||||
Reference in New Issue
Block a user