Changeset 3318 in CLRX


Ignore:
Timestamp:
Sep 6, 2017, 7:02:59 PM (15 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmAmdCL2: Fixed handling scratchbuffer and localsize in HSA config mode.
Next testcase to test it.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmAmdCL2Format.cpp

    r3316 r3318  
    921921        return;
    922922   
    923     if (handler.kernelStates[asmr.currentKernel]->useHsaConfig)
     923    if (handler.kernelStates[asmr.currentKernel]->useHsaConfig &&
     924        target >= AMDCL2CVAL_HSA_FIRST_PARAM)
    924925    {   // hsa config
    925926        handler.kernelStates[asmr.currentKernel]->initializeKernelConfig();
  • CLRadeonExtender/trunk/tests/amdasm/AsmAmdCL2Format.cpp

    r3317 r3318  
    744744    /* AMD HSA config */
    745745    {
    746         R"ffDXD(/* Disassembling 'opencl_program-Bonaire.clo' */
    747 .amdcl2
     746        R"ffDXD(.amdcl2
    748747.gpu Bonaire
    749748.64bit
     
    761760        .priority 0
    762761        .userdatanum 6
    763         .pgmrsrc1 0x00ac0083
    764         .pgmrsrc2 0x0000038c
    765762        .codeversion 1, 1
    766763        .machine 1, 0, 0, 0
     
    861858  nullptr
    862859)ffDXD", "", true
     860    },
     861    {
     862        R"ffDXD(.amdcl2
     863.gpu Bonaire
     864.64bit
     865.arch_minor 0
     866.arch_stepping 0
     867.driver_version 234800
     868.kernel GenerateScramblerKernel
     869    .hsaconfig
     870        .dims xyz
     871        .dx10clamp
     872        .ieeemode
     873        .floatmode 0xc0
     874        .priority 0
     875        .userdatanum 6
     876        .codeversion 1, 1
     877        .machine 1, 4, 6, 7
     878        .kernel_code_entry_offset 0x100
     879        .use_private_segment_buffer
     880        .use_kernarg_segment_ptr
     881        .private_elem_size 4
     882        .use_ptr64
     883        .call_convention 0x0
     884        .workgroup_fbarrier_count 3324
     885        .runtime_loader_kernel_symbol 0x4dc98b3a
     886        .scratchbuffer 77222
     887        .localsize 413
     888    .control_directive
     889        .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
     890    .hsaconfig
     891        .arg _.global_offset_0, "size_t", long
     892        .arg _.global_offset_1, "size_t", long
     893        .arg _.global_offset_2, "size_t", long
     894        .arg _.printf_buffer, "size_t", void*, global, , rdonly
     895        .arg _.vqueue_pointer, "size_t", long
     896        .arg _.aqlwrap_pointer, "size_t", long
     897        .arg d_wiring, "Wiring*", structure*, 1024, constant, const, rdonly
     898        .arg d_key, "Key*", structure*, 64, constant, const, rdonly
     899        .arg thblockShift, "uint", uint
     900        .arg localShift, "uint", uint
     901        .arg scramblerDataPitch, "uint", uint
     902        .arg scramblerData, "int8_t*", char*, global,
     903    .control_directive
     904        .fill 116, 1, 0x00
     905    .text
     906        s_mov_b32 s32, s14
     907        v_mov_b32 v42, v11
     908        s_endpgm
     909    .control_directive
     910        .int 2132
     911)ffDXD",
     912        R"ffDXD(AmdCL2BinDump:
     913  devType=Bonaire, aclVersion=, drvVersion=234800, compileOptions=""
     914  Kernel: GenerateScramblerKernel
     915    Code:
     916    0e03a0be0b03547e000081bf
     917    HSAConfig:
     918      Arg: "_.global_offset_0", "size_t", long, void, none, 0, 0, 0, default, 3
     919      Arg: "_.global_offset_1", "size_t", long, void, none, 0, 0, 0, default, 3
     920      Arg: "_.global_offset_2", "size_t", long, void, none, 0, 0, 0, default, 3
     921      Arg: "_.printf_buffer", "size_t", pointer, void, global, 0, 0, 0, default, 1
     922      Arg: "_.vqueue_pointer", "size_t", long, void, none, 0, 0, 0, default, 3
     923      Arg: "_.aqlwrap_pointer", "size_t", long, void, none, 0, 0, 0, default, 3
     924      Arg: "d_wiring", "Wiring*", pointer, structure, constant, 4, 1024, 0, default, 1
     925      Arg: "d_key", "Key*", pointer, structure, constant, 4, 64, 0, default, 1
     926      Arg: "thblockShift", "uint", uint, void, none, 0, 0, 0, default, 3
     927      Arg: "localShift", "uint", uint, void, none, 0, 0, 0, default, 3
     928      Arg: "scramblerDataPitch", "uint", uint, void, none, 0, 0, 0, default, 3
     929      Arg: "scramblerData", "int8_t*", pointer, char, global, 0, 0, 0, default, 3
     930      amdCodeVersion=1.1
     931      amdMachine=1:4:6:7
     932      kernelCodeEntryOffset=256
     933      kernelCodePrefetchOffset=0
     934      kernelCodePrefetchSize=0
     935      maxScrachBackingMemorySize=0
     936      computePgmRsrc1=0xac010a
     937      computePgmRsrc2=0x938d
     938      enableSgprRegisterFlags=0x9
     939      enableFeatureFlags=0xa
     940      workitemPrivateSegmentSize=77222
     941      workgroupGroupSegmentSize=413
     942      gdsSegmentSize=0
     943      kernargSegmentSize=96
     944      workgroupFbarrierCount=3324
     945      wavefrontSgprCount=35
     946      workitemVgprCount=43
     947      reservedVgprFirst=43
     948      reservedVgprCount=0
     949      reservedSgprFirst=33
     950      reservedSgprCount=0
     951      debugWavefrontPrivateSegmentOffsetSgpr=0
     952      debugPrivateSegmentBufferSgpr=0
     953      kernargSegmentAlignment=4
     954      groupSegmentAlignment=4
     955      privateSegmentAlignment=4
     956      wavefrontSize=6
     957      callConvention=0x0
     958      runtimeLoaderKernelSymbol=0x4dc98b3a
     959      ControlDirective:
     960      0001000000000000000000000000000000000000000000000000000000000000
     961      0000000000000000000000000000000000000000000000000000000000000000
     962      0000000000000000000000000000000000000000000000000000000000000000
     963      0000000000000000000000000000000000000000000000000000000054080000
     964  GlobalData:
     965  RwData:
     966  nullptr
     967  Bss size: 0, bssAlign: 0
     968  SamplerInit:
     969  nullptr
     970)ffDXD", "", true
    863971    }
    864972};
Note: See TracChangeset for help on using the changeset viewer.