Changeset 3316 in CLRX


Ignore:
Timestamp:
Sep 6, 2017, 6:18:12 PM (13 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmAmdCL2: Store dimmask to HSA config instead output.config. Add new testcase for HSA config.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r3315 r3316  
    10831083    if (!checkGarbagesAtEnd(asmr, linePtr))
    10841084        return;
    1085     handler.output.kernels[asmr.currentKernel].config.dimMask = dimMask;
     1085    if (!handler.kernelStates[asmr.currentKernel]->useHsaConfig)
     1086        handler.output.kernels[asmr.currentKernel].config.dimMask = dimMask;
     1087    else
     1088    {   // if HSA config
     1089        handler.kernelStates[asmr.currentKernel]->initializeKernelConfig();
     1090        handler.kernelStates[asmr.currentKernel]->config->dimMask = dimMask;
     1091    }
    10861092}
    10871093
  • CLRadeonExtender/trunk/tests/amdasm/AsmAmdCL2Format.cpp

    r3315 r3316  
    743743    },
    744744    /* AMD HSA config */
     745    {
     746        R"ffDXD(/* Disassembling 'opencl_program-Bonaire.clo' */
     747.amdcl2
     748.gpu Bonaire
     749.64bit
     750.arch_minor 0
     751.arch_stepping 0
     752.driver_version 234800
     753.kernel GenerateScramblerKernel
     754    .hsaconfig
     755        .dims xyz
     756        .sgprsnum 22
     757        .vgprsnum 16
     758        .dx10clamp
     759        .ieeemode
     760        .floatmode 0xc0
     761        .priority 0
     762        .userdatanum 6
     763        .pgmrsrc1 0x00ac0083
     764        .pgmrsrc2 0x0000038c
     765        .codeversion 1, 1
     766        .machine 1, 0, 0, 0
     767        .kernel_code_entry_offset 0x100
     768        .use_private_segment_buffer
     769        .use_kernarg_segment_ptr
     770        .private_elem_size 4
     771        .use_ptr64
     772        .kernarg_segment_size 96
     773        .kernarg_segment_align 16
     774        .group_segment_align 16
     775        .private_segment_align 16
     776        .wavefront_size 64
     777        .call_convention 0x0
     778    .control_directive
     779        .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
     780        .fill 120, 1, 0x00
     781    .hsaconfig
     782        .arg _.global_offset_0, "size_t", long
     783        .arg _.global_offset_1, "size_t", long
     784        .arg _.global_offset_2, "size_t", long
     785        .arg _.printf_buffer, "size_t", void*, global, , rdonly
     786        .arg _.vqueue_pointer, "size_t", long
     787        .arg _.aqlwrap_pointer, "size_t", long
     788        .arg d_wiring, "Wiring*", structure*, 1024, constant, const, rdonly
     789        .arg d_key, "Key*", structure*, 64, constant, const, rdonly
     790        .arg thblockShift, "uint", uint
     791        .arg localShift, "uint", uint
     792        .arg scramblerDataPitch, "uint", uint
     793        .arg scramblerData, "int8_t*", char*, global,
     794    .text
     795        s_load_dwordx2  s[0:1], s[4:5], 0x10
     796        s_waitcnt       lgkmcnt(0)
     797        s_sub_u32       s1, s1, s0
     798        v_bfe_u32       v1, v0, 0, s1
     799        v_cmp_ge_u32    vcc, 25, v1
     800        s_and_saveexec_b64 s[2:3], vcc
     801        v_lshrrev_b32   v0, s1, v0
     802        s_endpgm
     803)ffDXD",
     804        R"ffDXD(AmdCL2BinDump:
     805  devType=Bonaire, aclVersion=, drvVersion=234800, compileOptions=""
     806  Kernel: GenerateScramblerKernel
     807    Code:
     808    100540c07f008cbf01008180010090d20001050099028c7d6a2482be0100002c
     809    000081bf
     810    HSAConfig:
     811      Arg: "_.global_offset_0", "size_t", long, void, none, 0, 0, 0, default, 3
     812      Arg: "_.global_offset_1", "size_t", long, void, none, 0, 0, 0, default, 3
     813      Arg: "_.global_offset_2", "size_t", long, void, none, 0, 0, 0, default, 3
     814      Arg: "_.printf_buffer", "size_t", pointer, void, global, 0, 0, 0, default, 1
     815      Arg: "_.vqueue_pointer", "size_t", long, void, none, 0, 0, 0, default, 3
     816      Arg: "_.aqlwrap_pointer", "size_t", long, void, none, 0, 0, 0, default, 3
     817      Arg: "d_wiring", "Wiring*", pointer, structure, constant, 4, 1024, 0, default, 1
     818      Arg: "d_key", "Key*", pointer, structure, constant, 4, 64, 0, default, 1
     819      Arg: "thblockShift", "uint", uint, void, none, 0, 0, 0, default, 3
     820      Arg: "localShift", "uint", uint, void, none, 0, 0, 0, default, 3
     821      Arg: "scramblerDataPitch", "uint", uint, void, none, 0, 0, 0, default, 3
     822      Arg: "scramblerData", "int8_t*", pointer, char, global, 0, 0, 0, default, 3
     823      amdCodeVersion=1.1
     824      amdMachine=1:0:0:0
     825      kernelCodeEntryOffset=256
     826      kernelCodePrefetchOffset=0
     827      kernelCodePrefetchSize=0
     828      maxScrachBackingMemorySize=0
     829      computePgmRsrc1=0xac0083
     830      computePgmRsrc2=0x138c
     831      enableSgprRegisterFlags=0x9
     832      enableFeatureFlags=0xa
     833      workitemPrivateSegmentSize=0
     834      workgroupGroupSegmentSize=0
     835      gdsSegmentSize=0
     836      kernargSegmentSize=96
     837      workgroupFbarrierCount=0
     838      wavefrontSgprCount=22
     839      workitemVgprCount=16
     840      reservedVgprFirst=16
     841      reservedVgprCount=0
     842      reservedSgprFirst=20
     843      reservedSgprCount=0
     844      debugWavefrontPrivateSegmentOffsetSgpr=0
     845      debugPrivateSegmentBufferSgpr=0
     846      kernargSegmentAlignment=4
     847      groupSegmentAlignment=4
     848      privateSegmentAlignment=4
     849      wavefrontSize=6
     850      callConvention=0x0
     851      runtimeLoaderKernelSymbol=0x0
     852      ControlDirective:
     853      0001000000000000000000000000000000000000000000000000000000000000
     854      0000000000000000000000000000000000000000000000000000000000000000
     855      0000000000000000000000000000000000000000000000000000000000000000
     856      0000000000000000000000000000000000000000000000000000000000000000
     857  GlobalData:
     858  RwData:
     859  nullptr
     860  Bss size: 0, bssAlign: 0
     861  SamplerInit:
     862  nullptr
     863)ffDXD", "", true
     864    }
    745865};
    746866
Note: See TracChangeset for help on using the changeset viewer.