Changeset 3320 in CLRX


Ignore:
Timestamp:
Sep 6, 2017, 7:51:08 PM (4 months ago)
Author:
matszpk
Message:

CLRadeonExtender: CLRXDocs: add HSA config pseudo-ops and a missing pseudo-op '.compile_options' to ClrxAsmAmdCl2 docs.
Add a syntax to description of .gds_segment_size and .group_segment_align.

Location:
CLRadeonExtender/trunk/doc
Files:
3 edited

Legend:

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

    r3228 r3320  
    8989ARGTYPE\[\[, STRUCTSIZE], PTRSPACE\[, [ACCESS] [, [CONSTSIZE] [, unused]]]
    9090
    91 Adds kernel argument definition. Must be inside kernel configuration. First argument is
     91Adds kernel argument definition. Must be inside any kernel configuration. First argument is
    9292argument name from OpenCL kernel definition. Next optional argument is argument type name
    9393from OpenCL kernel definition. Next arugment is argument type:
     
    139139
    140140Go to global data bss section. Optional argument sets alignment of section.
     141
     142### .call_convention
     143
     144Syntax: .call_convention CALL_CONV
     145
     146This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`).
     147Set call convention for kernel.
     148
     149### .codeversion
     150
     151Syntax .codeversion MAJOR, MINOR
     152
     153This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`).
     154Set AMD code version.
     155
     156### .compile_options
     157
     158Syntax: .compile_options "STRING"
     159
     160Set compile options for this binary.
    141161
    142162### .config
     
    170190* .vgprsnum
    171191
     192### .control_directive
     193
     194Open control directive section. This section must be 128 bytes. The content of this
     195section will be stored in control_directive field in kernel configuration.
     196Must be defined inside kernel.
     197
    172198### .cws
    173199
    174200Syntax: .cws SIZEHINT[, SIZEHINT[, SIZEHINT]]
    175201
    176 This pseudo-operation must be inside kernel configuration.
     202This pseudo-operation must be inside any kernel configuration.
    177203Set reqd_work_group_size hint for this kernel.
    178204
     205### .debug_private_segment_buffer_sgpr
     206
     207Syntax: .debug_private_segment_buffer_sgpr SGPRREG
     208
     209This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     210`debug_private_segment_buffer_sgpr` field in kernel configuration.
     211
     212### .debug_wavefront_private_segment_offset_sgpr
     213
     214Syntax: .debug_wavefront_private_segment_offset_sgpr SGPRREG
     215
     216This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     217`debug_wavefront_private_segment_offset_sgpr` field in kernel configuration.
     218
    179219### .debugmode
    180220
    181 This pseudo-operation must be inside kernel configuration.
     221This pseudo-operation must be inside any kernel configuration.
    182222Enable usage of the DEBUG_MODE.
    183223
     
    186226Syntax: .dims DIMENSIONS
    187227
    188 This pseudo-operation must be inside kernel configuration. Defines what dimensions
     228This pseudo-operation must be inside any kernel configuration. Defines what dimensions
    189229(from list: x, y, z) will be used to determine space of the kernel execution.
    190230
     
    198238### .dx10clamp
    199239
    200 This pseudo-operation must be inside kernel configuration.
     240This pseudo-operation must be inside any kernel configuration.
    201241Enable usage of the DX10_CLAMP.
    202242
     
    205245Syntax: .exceptions EXCPMASK
    206246
    207 This pseudo-operation must be inside kernel configuration.
     247This pseudo-operation must be inside any kernel configuration.
    208248Set exception mask in PGMRSRC2 register value. Value should be 7-bit.
    209249
     250### .gds_segment_size
     251
     252Syntax: .gds_segment_size SIZE
     253
     254This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     255`gds_segment_size` field in kernel configuration.
     256
    210257### .gdssize
    211258
    212259Syntax: .gdssize SIZE
    213260
    214 This pseudo-operation must be inside kernel configuration. Set the GDS
     261This pseudo-operation must be inside any kernel configuration. Set the GDS
    215262(global data share) size.
    216263
     
    225272Go to constant global data section.
    226273
     274### .group_segment_align
     275
     276Syntax: .group_segment_align ALIGN
     277
     278This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     279`group_segment_align` field in kernel configuration.
     280
     281### .hsaconfig
     282
     283Open kernel HSA configuration. Must be inside kernel. Kernel configuration can not be
     284defined if any isametadata, metadata or stub was defined. Do not mix with `.config`.
     285
    227286### .ieeemode
    228287
    229 This pseudo-op must be inside kernel configuration. Set ieee-mode.
     288This pseudo-op must be inside any kernel configuration. Set ieee-mode.
    230289
    231290### .inner
     
    238297(only older driver binaries).
    239298
     299### .kernarg_segment_align
     300
     301Syntax: .kernarg_segment_align ALIGN
     302
     303This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     304`kernarg_segment_alignment` field in kernel configuration. Value must be a power of two.
     305
     306### .kernarg_segment_size
     307
     308Syntax: .kernarg_segment_size SIZE
     309
     310This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     311`kernarg_segment_byte_size` field in kernel configuration.
     312
     313### .kernel_code_entry_offset
     314
     315Syntax: .kernel_code_entry_offset OFFSET
     316
     317This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     318`kernel_code_entry_byte_offset` field in kernel configuration. This field
     319store offset between configuration and kernel code. By default is 256.
     320
     321### .kernel_code_prefetch_offset
     322
     323Syntax: .kernel_code_prefetch_offset OFFSET
     324
     325This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     326`kernel_code_prefetch_byte_offset` field in kernel configuration.
     327
     328### .kernel_code_prefetch_size
     329
     330Syntax: .kernel_code_prefetch_size OFFSET
     331
     332This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     333`kernel_code_prefetch_byte_size` field in kernel configuration.
     334
    240335### .localsize
    241336
    242337Syntax: .localsize SIZE
    243338
    244 This pseudo-operation must be inside kernel configuration. Set the initial
     339This pseudo-operation must be inside any kernel configuration. Set the initial
    245340local data size.
     341
     342### .machine
     343
     344Syntax: .machine KIND, MAJOR, MINOR, STEPPING
     345
     346This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     347machine version fields in kernel configuration.
     348
     349### .max_scratch_backing_memory
     350
     351Syntax: .max_scratch_backing_memory SIZE
     352
     353This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     354`max_scratch_backing_memory_byte_size` field in kernel configuration.
    246355
    247356### .metadata
     
    261370Syntax: .pgmrsrc2 VALUE
    262371
    263 This pseudo-operation must be inside kernel configuration. Set PGMRSRC2 value.
     372This pseudo-operation must be inside any kernel configuration. Set PGMRSRC2 value.
    264373If dimensions is set then bits that controls dimension setup will be ignored.
    265374SCRATCH_EN bit will be ignored.
     
    271380This pseudo-operation must be inside kernel. Defines priority (0-3).
    272381
     382### .private_elem_size
     383
     384Syntax: .private_elem_size ELEMSIZE
     385
     386This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`).
     387Set `private_element_size` field in kernel configuration.
     388Must be a power of two between 2 and 16.
     389
     390### .private_segment_align
     391
     392Syntax: .private_segment ALIGN
     393
     394This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     395`private_segment_alignment` field in kernel configuration. Value must be a power of two.
     396
    273397### .privmode
    274398
    275399This pseudo-operation must be inside kernel.
    276400Enable usage of the PRIV (privileged mode).
     401
     402### .reserved_sgprs
     403
     404Syntax: .reserved_sgprs FIRSTREG, LASTREG
     405
     406This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     407`reserved_sgpr_first` and `reserved_sgpr_count` fields in kernel configuration.
     408`reserved_sgpr_count` filled by number of registers (LASTREG-FIRSTREG+1).
     409
     410### .reserved_vgprs
     411
     412Syntax: .reserved_vgprs FIRSTREG, LASTREG
     413
     414This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     415`reserved_vgpr_first` and `reserved_vgpr_count` fields in kernel configuration.
     416`reserved_vgpr_count` filled by number of registers (LASTREG-FIRSTREG+1).
     417
     418### .runtime_loader_kernel_symbol
     419
     420Syntax: .runtime_loader_kernel_symbol ADDRESS
     421
     422This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     423`runtime_loader_kernel_symbol` field in kernel configuration.
    277424
    278425### .rwdata
     
    302449Syntax: .scratchbuffer SIZE
    303450
    304 This pseudo-operation must be inside kernel configuration.
     451This pseudo-operation must be inside any kernel configuration.
    305452Set scratchbuffer size.
    306453
     
    311458### .setupargs
    312459
    313 This pseudo-op must be inside kernel configuration. Add first kernel setup arguments.
     460This pseudo-op must be inside any kernel configuration. Add first kernel setup arguments.
    314461This pseudo-op must be before any other arguments.
    315462
     
    318465Syntax: .sgprsnum REGNUM
    319466
    320 This pseudo-op must be inside kernel configuration. Set number of scalar
     467This pseudo-op must be inside any kernel configuration. Set number of scalar
    321468registers which can be used during kernel execution.
    322469
     
    327474### .tgsize
    328475
    329 This pseudo-op must be inside kernel configuration.
     476This pseudo-op must be inside any kernel configuration.
    330477Enable usage of the TG_SIZE_EN.
    331478
     479### .use_debug_enabled
     480
     481This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     482`is_debug_enabled` field in kernel configuration.
     483
     484### .use_dispatch_id
     485
     486This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     487`enable_sgpr_dispatch_id` field in kernel configuration.
     488
     489### .use_dispatch_ptr
     490
     491This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     492`enable_sgpr_dispatch_ptr` field in kernel configuration.
     493
     494### .use_dynamic_call_stack
     495
     496This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     497`is_dynamic_call_stack` field in kernel configuration.
     498
     499### .use_flat_scratch_init
     500
     501This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     502`enable_sgpr_flat_scratch_init` field in kernel configuration.
     503
     504### .use_grid_workgroup_count
     505
     506Syntax: .use_grid_workgroup_count DIMENSIONS
     507
     508This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     509`enable_sgpr_grid_workgroup_count_X`, `enable_sgpr_grid_workgroup_count_Y`
     510and `enable_sgpr_grid_workgroup_count_Z` fields in kernel configuration,
     511respectively by given dimensions.
     512
     513### .use_kernarg_segment_ptr
     514
     515This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     516`enable_sgpr_kernarg_segment_ptr` field in kernel configuration.
     517
     518### .use_ordered_append_gds
     519
     520This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     521`enable_ordered_append_gds` field in kernel configuration.
     522
     523### .use_private_segment_buffer
     524
     525This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     526`enable_sgpr_private_segment_buffer` field in kernel configuration.
     527
     528### .use_private_segment_size
     529
     530This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     531`enable_sgpr_private_segment_size` field in kernel configuration.
     532
     533### .use_ptr64
     534
     535This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`).
     536Enable `is_ptr64` field in kernel configuration.
     537
     538### .use_queue_ptr
     539
     540This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     541`enable_sgpr_queue_ptr` field in kernel configuration.
     542
     543### .use_xnack_enabled
     544
     545This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Enable
     546`is_xnack_enabled` field in kernel configuration.
     547
    332548### .useargs
    333549
    334 This pseudo-op must be inside kernel configuration. Indicate that kernel uses arguments.
     550This pseudo-op must be inside any kernel (non-HSA) configuration.
     551Indicate that kernel uses arguments.
    335552
    336553### .useenqueue
    337554
    338 This pseudo-op must be inside kernel configuration. Indicate that kernel uses
    339 enqueue mechanism.
     555This pseudo-op must be inside any kernel (non-HSA) configuration.
     556Indicate that kernel uses enqueue mechanism.
    340557
    341558### .usegeneric
    342559
    343 This pseudo-op must be inside kernel configuration. Indicate that kernel uses
    344 generic pointers mechanism (FLAT instructions).
     560This pseudo-op must be inside any kernel (non-HSA) configuration.
     561Indicate that kernel uses generic pointers mechanism (FLAT instructions).
    345562
    346563### .usesetup
    347564
    348 This pseudo-op must be inside kernel configuration. Indicate that kernel uses
    349 setup data (global sizes, local sizes, work groups num).
     565This pseudo-op must be inside any kernel (non-HSA) configuration.
     566Indicate that kernel uses setup data (global sizes, local sizes, work groups num).
     567
     568### .userdatanum
     569
     570Syntax: .userdatanum NUMBER
     571
     572This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set number of
     573registers for USERDATA.
    350574
    351575### .vgprsnum
     
    353577Syntax: .vgprsnum REGNUM
    354578
    355 This pseudo-op must be inside kernel configuration. Set number of vector
     579This pseudo-op must be inside any kernel configuration. Set number of vector
    356580registers which can be used during kernel execution.
     581
     582### .wavefront_sgpr_count
     583
     584Syntax: .wavefront_sgpr_count REGNUM
     585
     586This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     587`wavefront_sgpr_count` field in kernel configuration.
     588
     589### .wavefront_size
     590
     591Syntax: .wavefront_size POWEROFTWO
     592
     593This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`).
     594Set `wavefront_size` field in kernel configuration. Value must be a power of two.
     595
     596### .workgroup_fbarrier_count
     597
     598Syntax: .workgroup_fbarrier_count COUNT
     599
     600This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     601`workgroup_fbarrier_count` field in kernel configuration.
     602
     603### .workgroup_group_segment_size
     604
     605Syntax: .workgroup_group_segment_size SIZE
     606
     607This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     608`workgroup_group_segment_byte_size` in kernel configuration.
     609
     610### .workitem_private_segment_size
     611
     612Syntax: .workitem_private_segment_size SIZE
     613
     614This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     615`workitem_private_segment_byte_size` field in kernel configuration.
     616
     617### .workitem_vgpr_count
     618
     619Syntax: .workitem_vgpr_count REGNUM
     620
     621This pseudo-op must be inside kernel HSA configuration (`.hsaconfig`). Set
     622`workitem_vgpr_count` field in kernel configuration.
    357623
    358624## Sample code
  • CLRadeonExtender/trunk/doc/ClrxAsmGallium.md

    r3309 r3320  
    226226### .gds_segment_size
    227227
     228Syntax: .gds_segment_size SIZE
     229
    228230This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
    229231LLVM version is 4.0.0 or later. Set `gds_segment_size` field in kernel configuration.
     
    246248
    247249### .group_segment_align
     250
     251Syntax: .group_segment_align ALIGN
    248252
    249253This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     
    350354### .hsa_userdatanum
    351355
    352 Syntax: .userdatanum NUMBER
     356Syntax: .hsa_userdatanum NUMBER
    353357
    354358This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
  • CLRadeonExtender/trunk/doc/ClrxAsmRocm.md

    r3308 r3320  
    119119### .gds_segment_size
    120120
     121Syntax: .gds_segment_size SIZE
     122
    121123This pseudo-op must be inside kernel configuration (`.config`). Set
    122124`gds_segment_size` field in kernel configuration.
    123125
    124126### .group_segment_align
     127
     128Syntax: .group_segment_align ALIGN
    125129
    126130This pseudo-op must be inside kernel configuration (`.config`). Set
Note: See TracChangeset for help on using the changeset viewer.