Changeset 3287 in CLRX


Ignore:
Timestamp:
Sep 2, 2017, 9:05:50 AM (5 months ago)
Author:
matszpk
Message:

CLRadeonExtender: CLRXDocs: Fixes typos in AsmRocm?. Add description of new pseudo-ops for handling HSA configuration in GalliumCompute?.

Location:
CLRadeonExtender/trunk/doc
Files:
2 edited

Legend:

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

    r3256 r3287  
    3232
    3333## List of the specific pseudo-operations
     34
     35### .arch_minor
     36
     37Syntax: .arch_minor ARCH_MINOR
     38
     39Set architecture minor number. Used only if LLVM version is 4.0.0 or later.
     40
     41### .arch_stepping
     42
     43Syntax: .arch_minor ARCH_STEPPING
     44
     45Set architecture stepping number. Used only if LLVM version is 4.0.0 or later.
    3446
    3547### .arg
     
    8294
    8395Open kernel argument configuration. Must be inside kernel.
     96
     97### .call_convention
     98
     99Syntax: .call_convention CALL_CONV
     100
     101This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     102LLVM version is 4.0.0 or later. Set call convention for kernel.
     103
     104### .codeversion
     105
     106Syntax .codeversion MAJOR, MINOR
     107
     108This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     109LLVM version is 4.0.0 or later. Set AMD code version.
    84110
    85111### .config
     
    117143```
    118144
     145### .control_directive
     146
     147Open control directive section. This section must be 128 bytes. The content of this
     148section will be stored in control_directive field in kernel configuration.
     149Must be defined inside kernel. Can ben used only if LLVM version is 4.0.0 or later
     150
     151### .debug_private_segment_buffer_sgpr
     152
     153Syntax: .debug_private_segment_buffer_sgpr SGPRREG
     154
     155This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     156LLVM version is 4.0.0 or later. Set `debug_private_segment_buffer_sgpr` field in
     157kernel configuration.
     158
     159### .debug_wavefront_private_segment_offset_sgpr
     160
     161Syntax: .debug_wavefront_private_segment_offset_sgpr SGPRREG
     162
     163This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     164LLVM version is 4.0.0 or later. Set `debug_wavefront_private_segment_offset_sgpr` field in
     165kernel configuration.
     166
    119167### .debugmode
    120168
     
    167215Set floatmode (FP_ROUND and FP_DENORM fields of the MODE register). Default value is 0xc0.
    168216
     217### .gds_segment_size
     218
     219This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     220LLVM version is 4.0.0 or later. Set `gds_segment_size` field in kernel configuration.
     221
    169222### .get_driver_version
    170223
     
    182235
    183236Go to constant global data section (`.rodata`).
     237
     238### .group_segment_align
     239
     240This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     241LLVM version is 4.0.0 or later. Set `group_segment_align` field in kernel configuration.
     242
     243### .hsa_debugmode
     244
     245This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     246LLVM version is 4.0.0 or later. Enable usage of the DEBUG_MODE in kernel HSA configuration.
     247
     248### .hsa_dims
     249
     250Syntax: .hsa_dims DIMENSIONS
     251
     252This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     253LLVM version is 4.0.0 or later. Defines what dimensions (from list: x, y, z) will be used
     254to determine space of the kernel execution in kernel HSA configuration.
     255
     256### .hsa_dx10clamp
     257
     258This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     259LLVM version is 4.0.0 or later. Enable usage of the DX10_CLAMP in kernel HSA configuration.
     260
     261### .hsa_exceptions
     262
     263Syntax: .hsa_exceptions EXCPMASK
     264
     265This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     266LLVM version is 4.0.0 or later. Set exception mask in PGMRSRC2 register value in
     267kernel HSA configuration. Value should be 7-bit.
     268
     269### .hsa_floatmode
     270
     271Syntax: .hsa_floatmode BYTE-VALUE
     272
     273This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     274LLVM version is 4.0.0 or later. Defines float-mode in kernel HSA configuration.
     275Set floatmode (FP_ROUND and FP_DENORM fields of the MODE register). Default value is 0xc0.
     276
     277### .hsa_ieeemode
     278
     279Syntax: .hsa_ieeemode
     280
     281This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     282LLVM version is 4.0.0 or later. Set ieee-mode in kernel HSA configuration.
     283
     284### .hsa_localsize
     285
     286Syntax: .hsa_localsize SIZE
     287
     288This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     289LLVM version is 4.0.0 or later. Defines initial local memory size used by kernel in
     290kernel HSA configuration.
     291
     292### .hsa_pgmrsrc1
     293
     294Syntax: .hsa_pgmrsrc1 VALUE
     295
     296This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     297LLVM version is 4.0.0 or later. Defines value of the PGMRSRC1 in kernel HSA configuration.
     298
     299### .hsa_pgmrsrc2
     300
     301Syntax: .hsa_pgmrsrc2 VALUE
     302
     303This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     304LLVM version is 4.0.0 or later. Defines value of the PGMRSRC2 in kernel HSA configration.
     305If dimensions is set then bits that controls dimension setup will be ignored.
     306SCRATCH_EN bit will be ignored.
     307
     308### .priority
     309
     310Syntax: .hsa_priority PRIORITY
     311
     312This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     313LLVM version is 4.0.0 or later. Defines priority (0-3) in kernel HSA configuration.
     314
     315### .hsa_privmode
     316
     317This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     318LLVM version is 4.0.0 or later. Enable usage of the PRIV (privileged mode) in
     319kernel HSA configuration.
     320
     321### .hsa_sgprsnum
     322
     323Syntax: .hsa_sgprsnum REGNUM
     324
     325This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     326LLVM version is 4.0.0 or later. Set number of scalar registers which can be used during
     327kernel execution in kernel HSA configuration.
     328
     329### .hsa_tgsize
     330
     331This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     332LLVM version is 4.0.0 or later. Enable usage of the TG_SIZE_EN in kernel HSA configuration.
     333
     334### .hsa_userdatanum
     335
     336Syntax: .userdatanum NUMBER
     337
     338This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     339LLVM version is 4.0.0 or later. Set number of registers for USERDATA in
     340kernel HSA configuration.
     341
     342### .hsa_vgprsnum
     343
     344Syntax: .hsa_vgprsnum REGNUM
     345
     346This pseudo-op must be inside kernel configuration (`.config`) can ben used only if
     347LLVM version is 4.0.0 or later. Set number of vector registers which can be used during
     348kernel execution in kernel HSA configuration.
    184349
    185350### .ieeemode
     
    216381Close `.kcode` clause. Refer to `.kcode`.
    217382
     383### .kernarg_segment_align
     384
     385Syntax: .kernarg_segment_align ALIGN
     386
     387This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     388LLVM version is 4.0.0 or later. Set `kernarg_segment_alignment` field in
     389kernel configuration. Value must be a power of two.
     390
     391### .kernarg_segment_size
     392
     393Syntax: .kernarg_segment_size SIZE
     394
     395This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     396LLVM version is 4.0.0 or later. Set `kernarg_segment_byte_size` field in
     397kernel configuration.
     398
     399### .kernel_code_entry_offset
     400
     401Syntax: .kernel_code_entry_offset OFFSET
     402
     403This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     404LLVM version is 4.0.0 or later. Set `kernel_code_entry_byte_offset` field in
     405kernel configuration. This field store offset between configuration and kernel code.
     406By default is 256.
     407
     408### .kernel_code_prefetch_offset
     409
     410Syntax: .kernel_code_prefetch_offset OFFSET
     411
     412This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     413LLVM version is 4.0.0 or later. Set `kernel_code_prefetch_byte_offset` field in kernel
     414configuration.
     415
     416### .kernel_code_prefetch_size
     417
     418Syntax: .kernel_code_prefetch_size OFFSET
     419
     420This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     421LLVM version is 4.0.0 or later. Set `kernel_code_prefetch_byte_size` field in kernel configuration.
     422
    218423### .llvm_version
    219424
     
    230435local memory size used by kernel.
    231436
     437### .machine
     438
     439Syntax: .machine KIND, MAJOR, MINOR, STEPPING
     440
     441This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     442LLVM version is 4.0.0 or later. Set machine version fields in kernel configuration.
     443
     444### .max_scratch_backing_memory
     445
     446Syntax: .max_scratch_backing_memory SIZE
     447
     448This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     449LLVM version is 4.0.0 or later. Set `max_scratch_backing_memory_byte_size` field
     450in kernel configuration.
    232451
    233452### .pgmrsrc1
     
    252471This pseudo-op must be inside kernel configuration (`.config`). Defines priority (0-3).
    253472
     473### .private_elem_size
     474
     475Syntax: .private_elem_size ELEMSIZE
     476
     477This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     478LLVM version is 4.0.0 or later. Set `private_element_size` field in kernel configuration.
     479Must be a power of two between 2 and 16.
     480
     481### .private_segment_align
     482
     483Syntax: .private_segment ALIGN
     484
     485This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     486LLVM version is 4.0.0 or later. Set `private_segment_alignment` field in kernel
     487configuration. Value must be a power of two.
     488
    254489### .privmode
    255490
     
    263498was defined (by using `.config`).
    264499
     500### .reserved_sgprs
     501
     502Syntax: .reserved_sgprs FIRSTREG, LASTREG
     503
     504This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     505LLVM version is 4.0.0 or later. Set `reserved_sgpr_first` and `reserved_sgpr_count`
     506fields in kernel configuration. `reserved_sgpr_count` filled by number of registers
     507(LASTREG-FIRSTREG+1).
     508
     509### .reserved_vgprs
     510
     511Syntax: .reserved_vgprs FIRSTREG, LASTREG
     512
     513This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     514LLVM version is 4.0.0 or later. Set `reserved_vgpr_first` and `reserved_vgpr_count`
     515fields in kernel configuration. `reserved_vgpr_count` filled by number of registers
     516(LASTREG-FIRSTREG+1).
     517
     518### .runtime_loader_kernel_symbol
     519
     520Syntax: .runtime_loader_kernel_symbol ADDRESS
     521
     522This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     523LLVM version is 4.0.0 or later. Set `runtime_loader_kernel_symbol` field in kernel
     524configuration.
     525
    265526### .scratchbuffer
    266527
     
    295556Enable usage of the TG_SIZE_EN. Should be set.
    296557
     558### .use_debug_enabled
     559
     560This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     561LLVM version is 4.0.0 or later. Enable `is_debug_enabled` field in kernel configuration.
     562
     563### .use_dispatch_id
     564
     565This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     566LLVM version is 4.0.0 or later. Enable `enable_sgpr_dispatch_id` field in kernel
     567configuration.
     568
     569### .use_dispatch_ptr
     570
     571This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     572LLVM version is 4.0.0 or later. Enable `enable_sgpr_dispatch_ptr` field in kernel
     573configuration.
     574
     575### .use_dynamic_call_stack
     576
     577This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     578LLVM version is 4.0.0 or later. Enable `is_dynamic_call_stack` field in
     579kernel configuration.
     580
     581### .use_flat_scratch_init
     582
     583This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     584LLVM version is 4.0.0 or later. Enable `enable_sgpr_flat_scratch_init` field in
     585kernel configuration.
     586
     587### .use_grid_workgroup_count
     588
     589Syntax: .use_grid_workgroup_count DIMENSIONS
     590
     591This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     592LLVM version is 4.0.0 or later. Enable `enable_sgpr_grid_workgroup_count_X`,
     593`enable_sgpr_grid_workgroup_count_Y` and `enable_sgpr_grid_workgroup_count_Z` fields
     594in kernel configuration, respectively by given dimensions.
     595
     596### .use_kernarg_segment_ptr
     597
     598This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     599LLVM version is 4.0.0 or later. Enable `enable_sgpr_kernarg_segment_ptr` field in
     600kernel configuration.
     601
     602### .use_ordered_append_gds
     603
     604This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     605LLVM version is 4.0.0 or later. Enable `enable_ordered_append_gds` field in
     606kernel configuration.
     607
     608### .use_private_segment_buffer
     609
     610This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     611LLVM version is 4.0.0 or later. Enable `enable_sgpr_private_segment_buffer` field in
     612kernel configuration.
     613
     614### .use_private_segment_size
     615
     616This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     617LLVM version is 4.0.0 or later. Enable `enable_sgpr_private_segment_size` field in
     618kernel configuration.
     619
     620### .use_ptr64
     621
     622This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     623LLVM version is 4.0.0 or later. Enable `is_ptr64` field in kernel configuration.
     624
     625### .use_queue_ptr
     626
     627This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     628LLVM version is 4.0.0 or later. Enable `enable_sgpr_queue_ptr` field in
     629kernel configuration.
     630
     631### .use_xnack_enabled
     632
     633This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     634LLVM version is 4.0.0 or later. Enable `is_xnack_enabled` field in kernel configuration.
     635
    297636### .userdatanum
    298637
     
    308647This pseudo-op must be inside kernel configuration (`.config`). Set number of vector
    309648registers which can be used during kernel execution.
     649
     650### .wavefront_sgpr_count
     651
     652Syntax: .wavefront_sgpr_count REGNUM
     653
     654This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     655LLVM version is 4.0.0 or later. Set `wavefront_sgpr_count` field in kernel configuration.
     656
     657### .wavefront_size
     658
     659Syntax: .wavefront_size POWEROFTWO
     660
     661This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     662LLVM version is 4.0.0 or later. Set `wavefront_size` field in kernel configuration.
     663Value must be a power of two.
     664
     665### .workgroup_fbarrier_count
     666
     667Syntax: .workgroup_fbarrier_count COUNT
     668
     669This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     670LLVM version is 4.0.0 or later. Set `workgroup_fbarrier_count` field in
     671kernel configuration.
     672
     673### .workgroup_group_segment_size
     674
     675Syntax: .workgroup_group_segment_size SIZE
     676
     677This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     678LLVM version is 4.0.0 or later. Set `workgroup_group_segment_byte_size` in
     679kernel configuration.
     680
     681### .workitem_private_segment_size
     682
     683Syntax: .workitem_private_segment_size SIZE
     684
     685This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     686LLVM version is 4.0.0 or later. Set `workitem_private_segment_byte_size` field in
     687kernel configuration.
     688
     689### .workitem_vgpr_count
     690
     691Syntax: .workitem_vgpr_count REGNUM
     692
     693This pseudo-op must be inside kernel configuration (`.config`) and can ben used only if
     694LLVM version is 4.0.0 or later. Set `workitem_vgpr_count` field in kernel configuration.
     695
    310696
    311697## Sample code
  • CLRadeonExtender/trunk/doc/ClrxAsmRocm.md

    r3256 r3287  
    119119### .gds_segment_size
    120120
    121 This pseudo-op must be inside kernel configuration (`.config`).
     121This pseudo-op must be inside kernel configuration (`.config`). Set
     122`gds_segment_size` field in kernel configuration.
    122123
    123124### .group_segment_align
    124125
    125126This pseudo-op must be inside kernel configuration (`.config`). Set
    126 `gds_segment_byte_size` field in kernel configuration.
     127`group_segment_align` field in kernel configuration.
    127128
    128129### .ieeemode
Note: See TracChangeset for help on using the changeset viewer.