Ignore:
Timestamp:
Feb 3, 2018, 9:07:40 PM (22 months ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCm: First stuff do dump ROCm metadata. Print kernel config if DISASM_METADATA is not enabled.
Set reqWorkGroupSize, maxFlatWorkGroupSize and workGroupSizeHint to 0 by default (if not set).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r3706 r3715  
    4343{
    4444    langVersion[0] = langVersion[1] = BINGEN_NOTSUPPLIED;
    45     reqdWorkGroupSize[0] = reqdWorkGroupSize[1] =
    46             reqdWorkGroupSize[2] = BINGEN_NOTSUPPLIED;
    47     workGroupSizeHint[0] = workGroupSizeHint[1] =
    48             workGroupSizeHint[2] = BINGEN_NOTSUPPLIED;
     45    reqdWorkGroupSize[0] = reqdWorkGroupSize[1] = reqdWorkGroupSize[2] = 0;
     46    workGroupSizeHint[0] = workGroupSizeHint[1] = workGroupSizeHint[2] = 0;
    4947    kernargSegmentSize = BINGEN64_NOTSUPPLIED;
    5048    groupSegmentFixedSize = BINGEN64_NOTSUPPLIED;
     
    5553    vgprsNum = BINGEN_NOTSUPPLIED;
    5654    maxFlatWorkGroupSize = BINGEN64_NOTSUPPLIED;
    57     fixedWorkGroupSize[0] = fixedWorkGroupSize[1] =
    58             fixedWorkGroupSize[2] = BINGEN_NOTSUPPLIED;
     55    fixedWorkGroupSize[0] = fixedWorkGroupSize[1] = fixedWorkGroupSize[2] = 0;
    5956    spilledSgprs = BINGEN_NOTSUPPLIED;
    6057    spilledVgprs = BINGEN_NOTSUPPLIED;
     
    967964                    canToNextLevel = true;
    968965                    // initialize kernel attributes values
    969                     kernel.reqdWorkGroupSize[0] = BINGEN_NOTSUPPLIED;
    970                     kernel.reqdWorkGroupSize[1] = BINGEN_NOTSUPPLIED;
    971                     kernel.reqdWorkGroupSize[2] = BINGEN_NOTSUPPLIED;
    972                     kernel.workGroupSizeHint[0] = BINGEN_NOTSUPPLIED;
    973                     kernel.workGroupSizeHint[1] = BINGEN_NOTSUPPLIED;
    974                     kernel.workGroupSizeHint[2] = BINGEN_NOTSUPPLIED;
     966                    kernel.reqdWorkGroupSize[0] = 0;
     967                    kernel.reqdWorkGroupSize[1] = 0;
     968                    kernel.reqdWorkGroupSize[2] = 0;
     969                    kernel.workGroupSizeHint[0] = 0;
     970                    kernel.workGroupSizeHint[1] = 0;
     971                    kernel.workGroupSizeHint[2] = 0;
    975972                    kernel.runtimeHandle.clear();
    976973                    kernel.vecTypeHint.clear();
     
    988985                    kernel.spilledVgprs = BINGEN_NOTSUPPLIED;
    989986                    kernel.maxFlatWorkGroupSize = BINGEN64_DEFAULT;
    990                     kernel.fixedWorkGroupSize[0] = BINGEN_NOTSUPPLIED;
    991                     kernel.fixedWorkGroupSize[1] = BINGEN_NOTSUPPLIED;
    992                     kernel.fixedWorkGroupSize[2] = BINGEN_NOTSUPPLIED;
     987                    kernel.fixedWorkGroupSize[0] = 0;
     988                    kernel.fixedWorkGroupSize[1] = 0;
     989                    kernel.fixedWorkGroupSize[2] = 0;
    993990                    inKernelCodeProps = true;
    994991                    canToNextLevel = true;
     
    12291226}
    12301227
     1228void ROCmMetadata::parse(size_t metadataSize, const char* metadata)
     1229{
     1230    parseROCmMetadata(metadataSize, metadata, *this);
     1231}
     1232
    12311233/*
    12321234 * ROCm binary reader and generator
Note: See TracChangeset for help on using the changeset viewer.