P4 to Git Change 1329979 by gandryey@gera-w8 on 2016/10/21 13:26:53
SWDEV-86035 - Add PAL backend to OpenCL
- Allow device memory usage for blit kernels
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#32 edit
[ROCm/clr commit: 43f8188d59]
Esse commit está contido em:
@@ -469,8 +469,6 @@ HSAILProgram::linkImpl(amd::option::Options* options)
|
||||
aclType continueCompileFrom = ACL_TYPE_LLVMIR_BINARY;
|
||||
bool finalize = true;
|
||||
bool hsaLoad = true;
|
||||
internal_ = (compileOptions_.find("-cl-internal-kernel") !=
|
||||
std::string::npos) ? true : false;
|
||||
|
||||
// If !binaryElf_ then program must have been created using clCreateProgramWithBinary
|
||||
if (!binaryElf_) {
|
||||
@@ -936,7 +934,7 @@ void* ORCAHSALoaderContext::GpuMemAlloc(size_t size, size_t align, bool zero) {
|
||||
assert(size);
|
||||
assert(align);
|
||||
assert(sizeof(void*) == 8 || sizeof(void*) == 4);
|
||||
if (program_->isNull() || program_->isInternal()) {
|
||||
if (program_->isNull()) {
|
||||
return new char[size];
|
||||
}
|
||||
|
||||
@@ -962,19 +960,20 @@ bool ORCAHSALoaderContext::GpuMemCopy(void *dst, size_t offset, const void *src,
|
||||
if (0 == size) {
|
||||
return true;
|
||||
}
|
||||
if (program_->isNull() || program_->isInternal()) {
|
||||
if (program_->isNull()) {
|
||||
memcpy(reinterpret_cast<address>(dst) + offset, src, size);
|
||||
return true;
|
||||
}
|
||||
assert(program_->dev().xferQueue());
|
||||
pal::Memory* mem = reinterpret_cast<pal::Memory*>(dst);
|
||||
return program_->dev().xferMgr().writeBuffer(src, *mem, amd::Coord3D(offset), amd::Coord3D(size), true);
|
||||
constexpr bool WaitForCopy = true;
|
||||
mem->writeRawData(*mem->dev().xferQueue(), offset, size, src, WaitForCopy);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ORCAHSALoaderContext::GpuMemFree(void *ptr, size_t size)
|
||||
{
|
||||
if (program_->isNull() || program_->isInternal()) {
|
||||
if (program_->isNull()) {
|
||||
delete[] reinterpret_cast<char*>(ptr);
|
||||
}
|
||||
else {
|
||||
@@ -1020,9 +1019,6 @@ LightningProgram::linkImpl(amd::option::Options *options)
|
||||
{
|
||||
using namespace amd::opencl_driver;
|
||||
|
||||
internal_ = (compileOptions_.find("-cl-internal-kernel") !=
|
||||
std::string::npos) ? true : false;
|
||||
|
||||
aclType continueCompileFrom = llvmBinary_.empty()
|
||||
? getNextCompilationStageFromBinary(options)
|
||||
: ACL_TYPE_LLVMIR_BINARY;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário