ROCm-OpenCL-Driver icon indicating copy to clipboard operation
ROCm-OpenCL-Driver copied to clipboard

-Wb,-print-after-all doesn't work if AMD_OCL_IN_PROCESS=0

Open searlmc1 opened this issue 7 years ago • 0 comments

If using AMD_OCL_IN_PROCESS=0, I don't see the output from the compiler (e.g., -Wb,-print-after-all). Evgeniy looked into it and agreed that something is amiss.

Using an internal OpenCL build

try to output IR after every pass

$ echoBOA AMD_OCL_BUILD_OPTIONS_APPEND="-Wb,-print-after-all -save-temps-all"

try with AMD_OCL_IN_PROCESS=0; no IR

$ export AMD_OCL_IN_PROCESS=0 $ ./a.out clCreateCommandQueue..clCreateProgramWithSource..clBuildProgram..clSetKernelArg(s)..clEnqueueNDRangeKernel..clFinish..clEnqueueReadBuffer..clFinish..done. sum of initial c = 154.0970916748046875 sum of final c gpu = 132.538177490234375 sum of final on cpu = 20.899591445922851562 (cpu - gpu )/cpu = -111.638588 elapsed seconds : 0.004275858868

try again with AMD_OCL_IN_PROCESS=1; lots of IR

$ export AMD_OCL_IN_PROCESS=1 $ ./a.out 2>&1 | more clCreateCommandQueue..clCreateProgramWithSource..clBuildProgram..*** IR Dump After Convert OpenCL 1.2 builtins to 2.0 builtins ***; ModuleID = '/tmp/AMD_23813_19/t_23813_21.cl' source_filename = "/tmp/AMD_23813_19/t_23813_21.cl" target datalayout = "e-p:64:64-p1:64:64-p2:64:64-p3:32:32-p4:32:32-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512: 512-v1024:1024-v2048:2048-n32:64-A5" target triple = "amdgcn-amd-amdhsa-amdgizcl" …

searlmc1 avatar Jan 23 '18 21:01 searlmc1