P4 to Git Change 1981122 by gandryey@gera-win10 on 2019/08/09 17:59:31
SWDEV-79445 - OCL generic changes and code clean-up - Allow async execution with scratch on the same queue. COMPUTE_TMPRING_SIZE.WAVESIZE should be constant across all dispatches. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#151 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#40 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#145 edit
이 커밋은 다음에 포함됨:
1 부모
2fbff434ba
커밋
0a2d4e2dc3
3 파일이 변경됨
+29
-26
검색과 일치하는 파일 없음
@@ -2011,6 +2011,8 @@ bool Device::allocScratch(uint regNum, const VirtualGPU* vgpu, uint vgprs) {
|
||||
ScopedLockVgpus lock(*this);
|
||||
|
||||
scratch_[sb]->size_ = newSize;
|
||||
scratch_[sb]->privateMemSize_ = regNum * sizeof(uint32_t);
|
||||
|
||||
uint64_t size = 0;
|
||||
uint64_t offset = 0;
|
||||
|
||||
@@ -2064,8 +2066,8 @@ bool Device::allocScratch(uint regNum, const VirtualGPU* vgpu, uint vgprs) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Device::validateKernel(
|
||||
const amd::Kernel& kernel, const device::VirtualDevice* vdev, bool coop_groups) {
|
||||
bool Device::validateKernel(const amd::Kernel& kernel, const device::VirtualDevice* vdev,
|
||||
bool coop_groups) {
|
||||
// Find the number of scratch registers used in the kernel
|
||||
const device::Kernel* devKernel = kernel.getDeviceKernel(*this);
|
||||
uint regNum = static_cast<uint>(devKernel->workGroupInfo()->scratchRegs_);
|
||||
@@ -2239,33 +2241,30 @@ void Device::svmFree(void* ptr) const {
|
||||
}
|
||||
|
||||
bool Device::AcquireExclusiveGpuAccess() {
|
||||
// Lock the virtual GPU list
|
||||
vgpusAccess().lock();
|
||||
// Lock the virtual GPU list
|
||||
vgpusAccess().lock();
|
||||
|
||||
// Find all available virtual GPUs and lock them
|
||||
// from the execution of commands
|
||||
for (uint idx = 0; idx < vgpus().size(); ++idx) {
|
||||
vgpus()[idx]->execution().lock();
|
||||
// Make sure a wait is done
|
||||
vgpus()[idx]->WaitForIdleCompute();
|
||||
}
|
||||
// if (!hsa_exclusive_gpu_access_) {
|
||||
// @todo call rocr
|
||||
// hsa_exclusive_gpu_access_ = true;
|
||||
// }
|
||||
return true;
|
||||
// Find all available virtual GPUs and lock them
|
||||
// from the execution of commands
|
||||
for (uint idx = 0; idx < vgpus().size(); ++idx) {
|
||||
vgpus()[idx]->execution().lock();
|
||||
// Make sure a wait is done
|
||||
vgpus()[idx]->WaitForIdleCompute();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Device::ReleaseExclusiveGpuAccess(VirtualGPU& vgpu) const {
|
||||
vgpu.WaitForIdleCompute();
|
||||
// Find all available virtual GPUs and unlock them
|
||||
// for the execution of commands
|
||||
for (uint idx = 0; idx < vgpus().size(); ++idx) {
|
||||
vgpus()[idx]->execution().unlock();
|
||||
}
|
||||
vgpu.WaitForIdleCompute();
|
||||
// Find all available virtual GPUs and unlock them
|
||||
// for the execution of commands
|
||||
for (uint idx = 0; idx < vgpus().size(); ++idx) {
|
||||
vgpus()[idx]->execution().unlock();
|
||||
}
|
||||
|
||||
// Unock the virtual GPU list
|
||||
vgpusAccess().unlock();
|
||||
// Unock the virtual GPU list
|
||||
vgpusAccess().unlock();
|
||||
}
|
||||
|
||||
Device::SrdManager::~SrdManager() {
|
||||
|
||||
새 이슈에서 참조
사용자 차단