Changeset 3161 in CLRX


Ignore:
Timestamp:
Jun 15, 2017, 3:20:05 PM (2 years ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmGallium?: fixed calculating size of argSegment (for AmdHsaConfig?).

File:
1 edited

Legend:

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

    r3160 r3161  
    1919
    2020#include <CLRX/Config.h>
     21#include <iostream>
    2122#include <cstring>
    2223#include <string>
     
    2829#include <CLRX/amdasm/Assembler.h>
    2930#include <CLRX/amdasm/AsmFormats.h>
     31#include <CLRX/amdbin/GalliumBinaries.h>
    3032#include "AsmInternals.h"
    3133
     
    13611363            size_t argSegmentSize = 0;
    13621364            for (GalliumArgInfo& argInfo: output.kernels[ki].argInfos)
    1363                 argSegmentSize += (argInfo.targetSize+7) & ~size_t(7);
     1365            {
     1366                if (argInfo.semantic == GalliumArgSemantic::GRID_DIMENSION ||
     1367                        argInfo.semantic == GalliumArgSemantic::GRID_OFFSET)
     1368                    continue; // skip
     1369                argSegmentSize = (argSegmentSize + argInfo.targetAlign-1) &
     1370                        ~(argInfo.targetAlign-1);
     1371                argSegmentSize += argInfo.targetSize;
     1372                printf("argSize: %zu\n", argSegmentSize);
     1373            }
     1374            argSegmentSize += 16; // gridOffset and gridDim
    13641375            SULEV(outConfig.amdCodeVersionMajor, 1);
    13651376            SULEV(outConfig.amdCodeVersionMinor, 0);
Note: See TracChangeset for help on using the changeset viewer.