Changeset 3803 in CLRX


Ignore:
Timestamp:
Feb 16, 2018, 7:12:13 AM (16 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Add new option '--newROCmBinFormat'.

Location:
CLRadeonExtender/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdasm/Assembler.h

    r3791 r3803  
    437437    uint32_t llvmVersion; // GalliumCompute
    438438    bool _64bit;    ///
     439    bool newROCmBinFormat;
    439440    bool good;
    440441    bool resolvingRelocs;
     
    739740    void set64Bit(bool this64Bit)
    740741    {  _64bit = this64Bit; }
     742    /// is new ROCm binary format
     743    bool isNewROCmBinFormat() const
     744    { return newROCmBinFormat; }
     745    /// set new ROCm binary format
     746    void setNewROCmBinFormat(bool newFmt)
     747    { newROCmBinFormat = newFmt; }
    741748    /// get flags
    742749    Flags getFlags() const
  • CLRadeonExtender/trunk/amdasm/AsmROCmFormat.cpp

    r3801 r3803  
    123123{
    124124    sectionDiffsResolvable = true;
     125    output.newBinFormat = assembler.isNewROCmBinFormat();
    125126    output.metadataInfo.initialize();
    126127    output.archMinor = output.archStepping = UINT32_MAX;
  • CLRadeonExtender/trunk/amdasm/Assembler.cpp

    r3792 r3803  
    690690          deviceType(_deviceType),
    691691          driverVersion(0), llvmVersion(0),
    692           _64bit(false),
     692          _64bit(false), newROCmBinFormat(false),
    693693          isaAssembler(nullptr),
    694694          // initialize global scope: adds '.' to symbols
     
    728728          deviceType(_deviceType),
    729729          driverVersion(0), llvmVersion(0),
    730           _64bit(false),
     730          _64bit(false), newROCmBinFormat(false),
    731731          isaAssembler(nullptr),
    732732          // initialize global scope: adds '.' to symbols
  • CLRadeonExtender/trunk/doc/ClrxAsmInvoke.md

    r3642 r3803  
    1414[-g GPUDEVICE] [-A ARCH] [-t VERSION] [--defsym=SYM[=VALUE]] [--includePath=PATH]
    1515[--output OUTFILE] [--binaryFormat=BINFORMAT] [--64bit] [--gpuType=GPUDEVICE]
    16 [--arch=ARCH] [--driverVersion=VERSION] [--llvmVersion=VERSION] [--forceAddSymbols]
    17 [--noWarnings] [--alternate] [--buggyFPLit] [--oldModParam]
     16[--arch=ARCH] [--driverVersion=VERSION] [--llvmVersion=VERSION] [--newROCmBinFormat]
     17[--forceAddSymbols] [--noWarnings] [--alternate] [--buggyFPLit] [--oldModParam]
    1818[--noMacroCase] [--help] [--usage] [--version] [file...]
    1919
     
    7575    Choose LLVM compiler version. Version can be retrieved from clinfo program that display
    7676field Version. Version is number in that form: MajorVersion*100 + MinorVersion.
     77
     78* **--newROCmBinFormat**
     79
     80    Enable new ROCm binary format.
    7781
    7882* **-S**, **--forceAddSymbols**
  • CLRadeonExtender/trunk/programs/clrxasm.cpp

    r3575 r3803  
    5050    { "llvmVersion", 0, CLIArgType::UINT, false, false,
    5151        "set LLVM version (for GalliumCompute)", "VERSION" },
     52    { "newROCmBinFormat", 0, CLIArgType::NONE, false, false,
     53        "enable new ROCm binary format", nullptr },
    5254    { "forceAddSymbols", 'S', CLIArgType::NONE, false, false,
    5355        "force add symbols to binaries", nullptr },
     
    9193    uint32_t llvmVersion = 0;
    9294    Flags flags = 0;
     95    bool newROCmBinFormat = false;
    9396    if (cli.hasShortOption('b'))
    9497    {
     
    131134    if (cli.hasLongOption("oldModParam"))
    132135        flags |= ASM_OLDMODPARAM;
     136    if (cli.hasLongOption("newROCmBinFormat"))
     137        newROCmBinFormat = true;
    133138   
    134139    cxuint argsNum = cli.getArgsNum();
     
    145150    assembler->setDriverVersion(driverVersion);
    146151    assembler->setLLVMVersion(llvmVersion);
     152    assembler->setNewROCmBinFormat(newROCmBinFormat);
    147153   
    148154    size_t defSymsNum = 0;
  • CLRadeonExtender/trunk/programs/clrxasm.pod

    r3642 r3803  
    1010[-g GPUDEVICE] [-A ARCH] [-t VERSION] [--defsym=SYM[=VALUE]] [--includePath=PATH]
    1111[--output OUTFILE] [--binaryFormat=BINFORMAT] [--64bit] [--gpuType=GPUDEVICE]
    12 [--arch=ARCH] [--driverVersion=VERSION] [--llvmVersion=VERSION]
     12[--arch=ARCH] [--driverVersion=VERSION] [--llvmVersion=VERSION] [--newROCmBinFormat]
    1313[--forceAddSymbols] [--noWarnings] [--alternate] [--buggyFPLit] [--oldModParam]
    1414[--noMacroCase] [--help] [--usage] [--version] [file...]
     
    8080Choose LLVM compiler version. Version can be retrieved from clinfo program that display
    8181field Version. Version is number in that form: MajorVersion*100 + MinorVersion.
     82
     83=item B<--newROCmBinFormat>
     84
     85Enable new ROCm binary format.
    8286
    8387=item B<-S>, B<--forceAddSymbols>
Note: See TracChangeset for help on using the changeset viewer.