Changeset 3748 in CLRX


Ignore:
Timestamp:
Feb 7, 2018, 8:10:44 PM (15 months ago)
Author:
matszpk
Message:

CLRadeonExtender: CLRXDocs: Fix typo. Add description of the ROCm metadata pseudo-ops.

Location:
CLRadeonExtender/trunk/doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/doc/ClrxAsmGallium.md

    r3714 r3748  
    596596### .spilledsgprs
    597597
    598 Syntax: .sgpilledsgprs REGNUM
     598Syntax: .spilledsgprs REGNUM
    599599
    600600This pseudo-op must be inside kernel configuration (`.config`). Set number of scalar
     
    603603### .spilledvgprs
    604604
    605 Syntax: .sgpilledvgprs REGNUM
     605Syntax: .spilledvgprs REGNUM
    606606
    607607This pseudo-op must be inside kernel configuration (`.config`). Set number of vector
  • CLRadeonExtender/trunk/doc/ClrxAsmRocm.md

    r3702 r3748  
    2525Kernel function should to be aligned to 256 byte boundary.
    2626
     27Additional kernel informations and binary informations are in metadata ELF note.
     28It holds informations about `printf` calls, kernel configuration and its arguments.
     29
    2730## Register usage setup
    2831
     
    6770Open kernel configuration. Must be inside kernel.
    6871
     72The kernel metadata info config pseudo-ops:
     73
     74* .arg - add kernel argument
     75* .md_language - kernel language
     76* .cws, .reqd_work_group_size - reqd_work_group_size
     77* .work_group_size_hint - work_group_size_hint
     78* .fixed_work_group_size - fixed work group size
     79* .max_flat_work_group_size - max flat work group size
     80* .vectypehint - vector type hint
     81* .runtime_handle - runtime handle symbol name
     82* .md_kernarg_segment_align - kernel argument segment alignment
     83* .md_kernarg_segment_size - kernel argument segment size
     84* .md_group_segment_fixed_size - group segment fixed size
     85* .md_private_segment_fixed_size - private segment fixed size
     86* .md_symname - kernel symbol name
     87* .md_sgprsnum - number of SGPRs
     88* .md_vgprsnum - number of VGPRs
     89* .spilledsgprs - number of spilled SGPRs
     90* .spilledvgprs - number of spilled VGPRs
     91* .md_wavefront_size - wavefront size
     92
    6993### .control_directive
    7094
     
    7397Must be defined inside kernel.
    7498
     99### .cws, .reqd_work_group_size
     100
     101Syntax: .cws SIZEHINT[, SIZEHINT[, SIZEHINT]]
     102Syntax: .reqd_work_group_size SIZEHINT[, SIZEHINT[, SIZEHINT]]
     103
     104This pseudo-operation must be inside any kernel configuration.
     105Set reqd_work_group_size hint for this kernel in metadata info.
     106
    75107### .debug_private_segment_buffer_sgpr
    76108
     
    116148This pseudo-op must be inside kernel configuration (`.config`).
    117149Set exception mask in PGMRSRC2 register value. Value should be 7-bit.
     150
     151### .fixed_work_group_size
     152
     153Syntax: .fixed_work_group_size SIZEHINT[, SIZEHINT[, SIZEHINT]]
     154
     155This pseudo-operation must be inside any kernel configuration.
     156Set fixed_work_group_size for this kernel in metadata info.
    118157
    119158### .fkernel
     
    236275machine version fields in kernel configuration.
    237276
     277### .max_flat_work_group_size
     278
     279Syntax: .max_flat_work_group_size SIZE
     280
     281This pseudo-op must be inside kernel configuration (`.config`).
     282Set max flat work group size in metadata info.
     283
    238284### .max_scratch_backing_memory
    239285
     
    242288This pseudo-op must be inside kernel configuration (`.config`). Set
    243289`max_scratch_backing_memory_byte_size` field in kernel configuration.
     290
     291### .md_group_segment_fixed_size
     292
     293Syntax: .md_group_segment_fixed_size SIZE
     294
     295This pseudo-op must be inside kernel configuration (`.config`).
     296Set group segment fixed size in metadata info.
     297
     298### .md_kernarg_segment_align
     299
     300Syntax: .md_kernarg_segment_align ALIGNMENT
     301
     302This pseudo-op must be inside kernel configuration (`.config`).
     303Set kernel argument segment alignment in metadata info.
     304
     305### .md_kernarg_segment_size
     306
     307Syntax: .md_kernarg_segment_size SIZE
     308
     309This pseudo-op must be inside kernel configuration (`.config`).
     310Set kernel argument segment size in metadata info.
     311
     312### .md_private_segment_fixed_size
     313
     314Syntax: .md_private_segment_fixed_size SIZE
     315
     316This pseudo-op must be inside kernel configuration (`.config`).
     317Set private segment fixed size in metadata info.
     318
     319### .md_symname
     320
     321Syntax: .md_symname "SYMBOLNAME"
     322
     323This pseudo-op must be inside kernel configuration (`.config`).
     324Set kernel symbol name in metadata info. It should be in format "NAME@kd".
     325
     326### .md_language
     327
     328Syntax .md_language "LANGUAGE"[, MAJOR, MINOR]
     329
     330This pseudo-op must be inside kernel configuration (`.config`).
     331Set kernel language and its version in metadata info. The language name is as string.
     332
     333### .md_sgprsnum
     334
     335Syntax: .md_sgprsnum REGNUM
     336
     337This pseudo-op must be inside kernel configuration (`.config`).
     338Defines number of scalar registers for kernel in metadata info.
     339
     340### .md_version
     341
     342Syntax: .md_version MAJOR, MINOR
     343
     344This pseudo-ops defines metadata format version.
     345
     346### .md_wavefront_size
     347
     348Syntax: .md_wavefront_size SIZE
     349
     350This pseudo-op must be inside kernel configuration (`.config`).
     351Defines wavefront size in metadata info. If not specified then value get from HSA config.
     352
     353### .md_vgprsnum
     354
     355Syntax: .md_vgprsnum REGNUM
     356
     357This pseudo-op must be inside kernel configuration (`.config`).
     358Defines number of vector registers for kernel in metadata info.
    244359
    245360### .newbinfmt
     
    262377will be ignored. SCRATCH_EN bit will be ignored.
    263378
     379### .printf
     380
     381Syntax: .printf [ID]\[,ARGSIZE,....],"FORMAT"
     382
     383This pseudo-op must be inside kernel configuration (`.config`).
     384Adds new printf info entry to metadata info. The first argument is ID (must be unique)
     385and is optional. Next arguments are argument size for printf call. The last argument
     386is format string.
     387
    264388### .priority
    265389
     
    302426`reserved_vgpr_first` and `reserved_vgpr_count` fields in kernel configuration.
    303427`reserved_vgpr_count` filled by number of registers (LASTREG-FIRSTREG+1).
     428
     429### .runtime_handle
     430
     431Syntax: .runtime_handle "SYMBOLNAME"
     432
     433This pseudo-op must be inside kernel configuration (`.config`).
     434Set runtime handle in metadata info
    304435
    305436### .runtime_loader_kernel_symbol
     
    324455It counts SGPR registers including VCC, FLAT_SCRATCH and XNACK_MASK.
    325456
     457### .spilledsgprs
     458
     459Syntax: .spilledsgprs REGNUM
     460
     461This pseudo-op must be inside kernel configuration (`.config`). Set number of scalar
     462registers to spill in scratch buffer (in metadata info).
     463
     464### .spilledvgprs
     465
     466Syntax: .spilledvgprs REGNUM
     467
     468This pseudo-op must be inside kernel configuration (`.config`). Set number of vector
     469registers to spill in scratch buffer (in metadata info).
     470
    326471### .target
    327472
     
    418563registers for USERDATA.
    419564
     565### .vectypehint
     566
     567Syntax: .vectypehint "OPENCLTYPE"
     568
     569This pseudo-op must be inside kernel configuration (`.config`).
     570Set vectypehint for kernel in metadata info. The argument is OpenCL type.
     571
    420572### .vgprsnum
    421573
     
    466618This pseudo-op must be inside kernel configuration (`.config`). Set
    467619`workitem_vgpr_count` field in kernel configuration.
     620
     621### .work_group_size_hint
     622
     623Syntax: .work_group_size_hint SIZEHINT[, SIZEHINT[, SIZEHINT]]
     624
     625This pseudo-operation must be inside any kernel configuration.
     626Set work_group_size_hint for this kernel in metadata info.
    468627
    469628## Sample code
Note: See TracChangeset for help on using the changeset viewer.