Tao Sang
fdef6f722f
Apply constexpr on global constant varaibles
...
When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.
Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef
2020-07-22 22:14:13 -04:00
Jason Tang
2800fc2fa3
SWDEV-232197 - Fix PAL build
...
Change-Id: Iad306077cadfd8de1491ac0a188eee4802d8ce1f
2020-07-22 17:10:03 -04:00
Jason Tang
65f4230494
SWDEV-232197 - Use TargetID for action_info_set_isa_name()
...
Change-Id: I6661a2bbc2e55586c1b5029694d67cb54a4f23a6
2020-07-22 13:47:17 -04:00
Freddy Paul
6b8ae3dd77
Align to new hsa cmake target usage.
...
HIP or any ROCm component above HIP may not be calling
hsa-runtime directly. OpenCl and HIP are the two components
calling ROCclr and to bring in the transitive dependency of
thunk,ROCR,amd_comgr it is better to have the dependency
chain set correctly in the ROCclr cmake target. With this
change OpenCl or HIP should not be setting ROCR dependency
directly.
This helps to link OpenCl(libamdocl.so) link statically with
comgr,hsa,thunk.
Change-Id: I0d538b7abc6a0ce700ec3332b97fc144db5fc5ff
2020-07-22 11:21:09 -04:00
Jatin Chaudhary
48690f29e9
Adding AnyOrder Flag
...
Change-Id: I6baaef42b98adfbc8cf2605e175ec007e008045f
2020-07-22 00:25:04 -04:00
Tao Sang
214827defa
Add numa lib detection in cmake
...
If numa lib is in building system, define ROCCLR_NUMA_SUPPORT to
support numa; otherwise, don't support numa.
Change-Id: I3848d7fdec5a3813ff1edad9b71ff04372dc0b9a
2020-07-21 14:58:56 -04:00
Rahul Garg
60473ae542
Handle size 0 symbols
...
Change-Id: I1629c5027ec5f9af48c8e9e0696829b844423096
2020-07-21 10:10:36 -04:00
Jason Tang
8b7e0f3cfe
SWDEV-232197 - Use HSA_ISA_INFO_NAME as the TargetID
...
TargetID will be passed to LC compiler.
Change-Id: I0385634922c11d53b57ebd596047698c47bda72b
2020-07-21 09:24:03 -04:00
Matt Arsenault
5577eabcea
Fix -Wmissing-braces
...
Change-Id: I2394b6923c789f36e72242f4b196844cc0ee90ba
2020-07-15 16:51:03 -04:00
Jason Tang
5e0bb5bd39
SWDEV-244000 - Print freeMem_ for memory accounting
...
Change-Id: I5bbce213236a109e9aa69766d2d4d370b58d0d08
2020-07-15 13:44:05 -04:00
kjayapra-amd
e993bf9f47
SWDEV-243423 - Avoid repeated metadata processing if the unbundled binary_ptr is same.
...
Change-Id: I71e008021b728dec61187d9ff29483ad8c4cad5c
2020-07-10 10:35:16 -04:00
agodavar
de31b341d2
SWDEV-242592:Remove define of UndefinedVars in setKernels
...
Change-Id: I51b0c5ac6c4cb2564a53f7c45fdf8a893a5edbd3
2020-07-09 23:15:31 -04:00
kjayapra-amd
16e6b65b5c
SWDEV-240165 - Move all amd::MemObjMap_ reference to ROCclr and only allow base ptr to get ipc handle.
...
Change-Id: I9de10a0c4ba4dee3b3c8b972966840ab807001d8
2020-07-09 21:19:45 -04:00
Jatin Chaudhary
cd1e364911
Replacing deprecated HSA API calls with newer ones
...
Change-Id: Iebe2c00e717ab0e47c61611752b717966c719994
2020-07-08 00:32:24 -04:00
Aryan Salmanpour
4a901f3dd3
Always print error message with the returned error code before abort
...
Change-Id: I8479abc586937a50c90b2785c4ce7364e6e9732b
2020-07-07 16:28:30 -04:00
Tao Sang
f7bf882981
Fix static lib crash by setting top init_priority
...
Set top init_priority on affecting global variables so that
they will be created firstly and destroyed lastly.
Change-Id: Ied59fbecab66ba8195c4a7a02b6bef9fa2fad3af
2020-07-06 16:54:10 -04:00
Matt Arsenault
cfed3f310d
Remove .value_type from code object v3 metadata
...
This seems to not actually have any function. The OpenCL API test
passes without it, and the way it's produced is problematic.
Change-Id: I384bfa01dee7023484348b184ddd1b2d44a91f7d
2020-07-06 11:07:30 -04:00
Matt Arsenault
c56a82fd05
Fix unused function warnings for conditionally used functions
...
Change-Id: Ied23c571b949abef1816914986f19b14aca3d2f3
2020-07-06 10:28:43 -04:00
Matt Arsenault
9e3e41ca2e
Remove unused functions
...
Change-Id: I55db791019c511de83d8b895e3a48b3d7475aeac
2020-07-06 10:27:29 -04:00
German Andryeyev
059832b526
Return always true for P2P validation under ROCr
...
Change-Id: Id32a5a94a642e708d1d042c5247af38501bec153
2020-07-04 11:38:04 -04:00
Aryan Salmanpour
34b82eb998
remove unused argument from enableHostcalls/disableHostcalls functions
...
Change-Id: I351a6b4e23cd9f118310c5c79b1afcb4758fde1b
2020-06-26 16:33:30 -04:00
Tao Sang
da94cd0de1
Support numa policy set by user
...
Add hostNumaAlloc() to support numa policy set by user
Change-Id: Ib6c3e838aa53e3d9b3db9735c585df46a1c98944
2020-06-23 18:57:03 -04:00
Dittakavi Satyanvesh
7a3b8c6dd2
SWDEV-240566 adds error message before abort
...
Change-Id: I4dbd089daa5e6fde5e8722dc2395225dd822561c
2020-06-22 10:12:49 -04:00
Jason Tang
532083f87c
For apu: call commitSvmMemory() from Device::svmAlloc()
...
Change-Id: Ic6e9b2ad4624e7e1c50835d3825254c76e764bf0
2020-06-22 10:09:32 -04:00
Jason Tang
138b2d3ce2
Set the tiled_ flag according to ImageCreateInfo
...
Change-Id: I3e1b2fdd15e32c3c24f4341001b068738c98e388
2020-06-19 12:34:07 -04:00
kjayapra-amd
71c05075ba
SWDEV-229840 - Add Debug prints when the element is already present in MemObjMap_
...
Change-Id: I21129d087e73cc2a9e35f03e6a1a2dc527626f48
2020-06-19 12:33:20 -04:00
German Andryeyev
01fcf82448
Switch PAL to interface 610
...
Change-Id: Ida563f38513789f5ba105ac92a9737c59cd5d90d
2020-06-19 11:40:12 -04:00
Jason Tang
155ff5bdcc
Merge pal Resource mapLayers/unmapLayers logic into map/unmap
...
Change-Id: I0198fb96f104539fb557f91160665e60ba576132
2020-06-19 10:51:48 -04:00
Aryan Salmanpour
1bd265f8d6
move hostcall-based implementation of messages/printf from rocm backend to the common device layer
...
SWDEV-232428
Change-Id: I14b774e66a1783569c6d34d8759c1faa5f340e27
2020-06-18 13:49:28 -04:00
Saleel Kudchadker
d8efc31c34
Reset GPU_FORCE_BLIT_COPY_SIZE as its fixed in KFD
...
Commit ebcfa85cf7ebb26c96fca48a34292d88e74dd675
fixes programming of SDMA*_ULV_CNTL.HYSTERIS register
Change-Id: Ibb1d824bf3f8e351f840adbc099601b322f935f6
2020-06-17 13:23:41 -07:00
Vlad Sytchenko
5b9af8f28d
Fix some -Wunused-but-set-variable warnings
...
Change-Id: I281583b5abdfc09d5dd8b7dfb20b8821581db193
2020-06-15 17:51:01 -04:00
German Andryeyev
afe825c506
Fix compile error in ATI make build
...
Change-Id: Id9d23b8f46bf1b97c0f02c8ae0edd94e6963b1b5
2020-06-15 10:31:57 -04:00
Tao Sang
b14d9e0a36
Deduce hops from numa distance
...
Rocr won't return real hops so that we have to deduce hops from
numa distance as a workaround. This will be subject to change
as driver team will provide a long term solution in rocm3.7
Change-Id: Ifb939ed848db190c3d544bb7f30a5821161921e6
2020-06-13 17:04:17 -04:00
Jason Tang
30e36a4925
Get gpu asicRevision_
...
Change-Id: I8afb53e027d912843655823eebaec29901c33d28
2020-06-12 14:51:52 -04:00
German Andryeyev
c5afd5d412
Initial HMM support
...
- Expose ROCclr interfaces for HIP usage
- ROCr interfaces aren't available in staging, thus control the
build with AMD_HMM_SUPPORT define
Change-Id: Iadc2bcc230e78d3b0dc22b235189c8cc80843446
2020-06-12 09:06:07 -04:00
Rahul Garg
617538074c
Fix IPC create memory failure
...
ROCr expects granular size in hsa_amd_ipc_memory_create
Change-Id: I7c266aa2eef8304f105298a7a668f4c4b3fb5f5a
2020-06-11 13:02:54 -04:00
Saleel Kudchadker
2b771d2f5f
Add logging support for AQL packet
...
Use AMD_LOG_LEVEL=4 and AMD_LOG_MASK=8 to print AQL log
explicitly
Change-Id: I4209d91b460e64be44261d3ab773580067e47c29
2020-06-10 14:04:47 -07:00
Aryan Salmanpour
5203c5271b
reuse available queue with the same priority if queue creation fails
...
Change-Id: I1522935ce1a73c4724135668d039e88a9097710b
2020-06-09 17:56:18 -04:00
Aryan Salmanpour
1d938697a1
fix a build error on TeamCity due to order of initialization in rocm Device class
...
Change-Id: I2e45e71e53272b7a7813422d3b949e3835077ab0
2020-06-08 13:56:39 -04:00
kjayapra-amd
1b0882e061
SWDEV-239327 - Dont call hsa_amd_memory_pool_free from ~amd::Memory() for obj created by passing devptr.
...
Change-Id: I315fd502df6bb1bf66dd24eac9325f1439e432ad
2020-06-05 18:42:03 -04:00
German Andryeyev
3828a61413
Make sure runtime sync before CPU access
...
Change-Id: I52882788ded187b3f735257a188b1b08d8502147
2020-06-05 12:00:08 -04:00
German Andryeyev
86e0f337fc
Add the sync of the current queue
...
Make sure runtime waits for the current queue before
synching with device queue
Change-Id: I753b6fc0bb15a3a3d4bf03fef1152842550850c0
2020-06-05 11:57:59 -04:00
kjayapra-amd
1982c16e46
FEAT-30761 - Adding defaults to all Switch cases in PalDevice gfx detection.
...
Change-Id: Ic998dba44d3287484d6b0da4f07f320de8e6d92b
2020-06-04 20:49:58 -04:00
Aryan Salmanpour
b5552aa97f
Add support for setting queue priority for ROCm backend
...
Change-Id: I67ed5a6868af79538f7f4522d8d11c043cdf3c1e
2020-06-04 20:16:32 -04:00
Saleel Kudchadker
d8ca3c632c
Set hidden mem witholding to 0 by default
...
TF doesn't reserve all available memory now. If any
client wants to reserve they can explicitly set
HIP_HIDDEN_FREE_MEM env var
Change-Id: Ied3a948b79f49aa7327f6a820e9789e39cec143b
2020-06-04 14:37:40 -04:00
Saleel Kudchadker
2b6fea4348
Fix a potential mem leak
...
If a offset of the pointer is passed to free it may release
the mem object but may not release from MemObjMap. Erase the map
by getting the parent pointer.
Change-Id: I06b92548de2d49b4029efe6b511329225007cc55
2020-06-04 14:05:11 -04:00
Vlad Sytchenko
3a84fcd13e
Handle the option USE_COMGR_LIBRARY correctly
...
This is a follow up to http://gerrit-git.amd.com/c/compute/ec/vdi/+/359563 . The setting is now either ON or OFF, never "yes".
Change-Id: I031d013a8d239dc72ef610da81bd31b8b78a3ba8
2020-06-03 17:25:47 -04:00
Tao Sang
fabfc42b68
Fix TC linux build issue due to previous Numa patch
...
Change-Id: I6068edaf38cac6fad187c8429707afdb727e8d41
2020-06-03 16:42:53 -04:00
Tao Sang
aedb9590be
Support Numa-aware cpu selection
...
Select cpu in terms of the smallest Numa distance for a GPU device.
This will improve performance of hipMemcpy in the mode of
hipMemcpyHostToDevice or hipMemcpyDeviceToHost for small buffer.
`
Change-Id: I2860f1f83b79be0dff7bf5e64cf68ab4448db0a1
2020-06-01 21:01:24 -04:00
German Andryeyev
fb401bfe6d
Revert "Revert "Reenable cooperative groups""
...
This reverts commit abc115bda8 .
Reason for revert: <INSERT REASONING HERE>
Change-Id: I93c45fae27e0a08b199542d44fb0d65fc74ea13c
2020-05-25 14:11:58 -04:00