P4 to Git Change 1272517 by gandryey@gera-w8 on 2016/05/24 15:54:08
SWDEV-94524 - [OCL] Call to clBuildProgram crashes amdocl64.dll
- Detect offline device and return a fake srd handle. Compiler must reload binary for a specific device in order for the binary to have proper functionality
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#226 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#5 edit
[ROCm/clr commit: 4c47086ac4]
Dieser Commit ist enthalten in:
@@ -2461,13 +2461,21 @@ void* ORCAHSALoaderContext::SegmentAddress(amdgpu_hsa_elf_segment_t segment,
|
||||
hsa_status_t ORCAHSALoaderContext::SamplerCreate(
|
||||
hsa_agent_t agent,
|
||||
const hsa_ext_sampler_descriptor_t *sampler_descriptor,
|
||||
hsa_ext_sampler_t *sampler_handle) {
|
||||
hsa_ext_sampler_t *sampler_handle)
|
||||
{
|
||||
if (!agent.handle) {
|
||||
return HSA_STATUS_ERROR_INVALID_AGENT;
|
||||
}
|
||||
if (!sampler_descriptor || !sampler_handle) {
|
||||
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
if (program_->isNull()) {
|
||||
// Offline compilation. Provide a fake handle to avoid an assert
|
||||
sampler_handle->handle = 1;
|
||||
return HSA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
uint32_t state = 0;
|
||||
switch (sampler_descriptor->coordinate_mode) {
|
||||
case HSA_EXT_SAMPLER_COORDINATE_MODE_UNNORMALIZED: state = amd::Sampler::StateNormalizedCoordsFalse; break;
|
||||
|
||||
@@ -811,13 +811,19 @@ void* ORCAHSALoaderContext::SegmentAddress(amdgpu_hsa_elf_segment_t segment,
|
||||
hsa_status_t ORCAHSALoaderContext::SamplerCreate(
|
||||
hsa_agent_t agent,
|
||||
const hsa_ext_sampler_descriptor_t *sampler_descriptor,
|
||||
hsa_ext_sampler_t *sampler_handle) {
|
||||
hsa_ext_sampler_t *sampler_handle)
|
||||
{
|
||||
if (!agent.handle) {
|
||||
return HSA_STATUS_ERROR_INVALID_AGENT;
|
||||
}
|
||||
if (!sampler_descriptor || !sampler_handle) {
|
||||
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
if (program_->isNull()) {
|
||||
// Offline compilation. Provide a fake handle to avoid an assert
|
||||
sampler_handle->handle = 1;
|
||||
return HSA_STATUS_SUCCESS;
|
||||
}
|
||||
uint32_t state = 0;
|
||||
switch (sampler_descriptor->coordinate_mode) {
|
||||
case HSA_EXT_SAMPLER_COORDINATE_MODE_UNNORMALIZED: state = amd::Sampler::StateNormalizedCoordsFalse; break;
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren