5 Replies Latest reply on Aug 31, 2017 7:22 AM by dipak

    Cannot compile a binary for gfx901 offline

    timchist

      We are shipping our Windows applications with pre-compiled GPU binaries for different device architecture (Tahiti, Hawaii, Fiji, Tonga, Ellesmere, Baffin, etc.).

       

      The compilation is done on a virtual machine without any GPUs by calling clCreateContextFromType with CL_CONTEXT_OFFLINE_DEVICES_AMD=1 and then running clCreateProgramWithSource, clBuildProgram. clGetProgramInfo(CL_PROGRAM_BINARIES).

       

      As no AMD driver is installed on the machine, driver files are extracted to a folder contained in system PATH.

      Source is compiled with these bif options: -fno-bin-source -fno-bin-llvmir -fno-bin-amdil -fbin-exe

       

      This works fine for all devices, including those mentioned above and gfx900. However, when I try to generate a binary for Vega Frontier Edition (gfx901), I'm getting the following error after calling clBuildProgram:

      AMD HSA Code Object loading failed.

       

      When I change bif options to -fno-bin-source -fno-bin-llvmir -fbin-amdil -fno-bin-exe, I'm receiving this:

      Extracting AMD HSA Code Object from binary failed.

       

      I also tried to perform the compilation on a computer with a Fury card installed, but received the same errors.

       

      What is the correct procedure to generate binary for Vega Frontier Edition (gfx901) on a computer running Windows 10 without this specific GPU?