Changeset 1679 in CLRX


Ignore:
Timestamp:
Nov 8, 2015, 8:30:20 AM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: clCompilerCall: get bitness from device info instead detecting that bitness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/clwrapper/CLInternals.cpp

    r1669 r1679  
    15411541    }
    15421542   
    1543     const bool is64Bit = parseEnvVariable<bool>("GPU_FORCE_64BIT_PTR");
    1544 #ifdef HAVE_64BIT
    1545     const uint32_t driverVersion = detectAmdDriverVersion();
    1546 #endif
    1547    
    15481543    /* compiling programs */
    15491544    struct OutDevEntry {
     
    16241619        Assembler assembler("", astream, asmFlags, BinaryFormat::AMD,
    16251620                    GPUDeviceType(devType), msgStream);
    1626 #ifdef HAVE_64BIT
    1627         /* if GPU_FORCE_64BIT_PTR is set or driverVersion>=1800.5 and arch>=GCN1.1 */
    1628         assembler.set64Bit(is64Bit || (driverVersion>=180005 &&
    1629                 getGPUArchitectureFromDeviceType(GPUDeviceType(devType)) >=
    1630                     GPUArchitecture::GCN1_1));
    1631 #else
    1632         assembler.set64Bit(is64Bit);
    1633 #endif
     1621       
     1622        cl_uint addressBits;
     1623        error = amdp->dispatch->clGetDeviceInfo(entry.second,
     1624                    CL_DEVICE_ADDRESS_BITS, sizeof(cl_uint), &addressBits, nullptr);
     1625        if (error != CL_SUCCESS)
     1626            clrxAbort("Fatal error at clCompilerCall (clGetDeviceInfo)");
     1627        assembler.set64Bit(addressBits==64);
    16341628       
    16351629        for (const CString& incPath: includePaths)
Note: See TracChangeset for help on using the changeset viewer.