Commit Graph

8920 Commits

Author SHA1 Message Date
Chris Freehill 2235ede34c Add event notification API
Change-Id: Ib6e8efbe6cdefaa7de1f74bd26993e9b4b011649
2020-05-06 14:07:25 -05:00
Matt Arsenault 96d4140609 Do not use llvm-dis to pick the triple
There are a couple problems with this. First, llvm-dis is an unstable
llvm development tool and 3rd party users should generally not rely on
it. The text format is unstable, and the regex here isn't even
explicitly looking for the target triple field, so it could
accidentally find something else. Second, picking the target to
compile based on the library you are linking is a fundamentally
backwards decision. The target you're compiling for changes the
library you would want to link. The device libraries are only ever
compiled with amdgcn-amd-amdhsa. If we had a second triple, this
should be explicitly building for any it cares about.

Change-Id: I3bae8398f60f78df61ab2177aa9e83f47ec6dea4
2020-05-06 13:28:39 -04:00
Evgeny Shcherbakov 49349eaff5 Merge "roctracer test with disabled hip api activity" into amd-master 2020-05-06 12:45:23 -04:00
Evgeny 0cca78c9c9 HIP API cb kernel name fixing
Change-Id: I296d652368b20c42283c9c46c44dbef64aae3772
2020-05-06 03:55:41 -05:00
Evgeny cee1be4739 HIP API cb kernel name fixing
Change-Id: I4f9443d1ccc800058dbf14685043a9677676abcb
2020-05-06 03:53:34 -05:00
Evgeny 3b62c5c6b9 roctracer test with disabled hip api activity
Change-Id: I6d2139a67810cafb9ccb94bf57f55e85e1ab0982
2020-05-06 00:02:24 -05:00
Rachida Kebichi 5cfc13a46c fixed 'bad record' issue in hip events
Change-Id: I601e508cf74ca5d9268dab3362085dbc512d390d
2020-05-05 22:13:10 -04:00
Rachida Kebichi 46f61d7a1e Added begin/end timestamps to hip events
Change-Id: I2689bef675db92f202d60a1fe12c500cd569aa63
2020-05-05 22:04:56 -04:00
Evgeny Shcherbakov c73c1bbf29 Merge "Added generation of hip ostream operators" into amd-master 2020-05-05 12:09:29 -04:00
Evgeny 3af87a7423 adding pid for kernel results to support multi-process profiling
Change-Id: I283228a4b4145599c5e637dd6faa771b9f4b6345
2020-05-05 05:35:32 -05:00
Evgeny 463869d556 optimize HIP API tracing
Change-Id: I43df8d8c4d2165d6ad63665b8bd1d86f99c5dffc
2020-05-05 04:08:13 -05:00
Laurent Morichetti df03a377f5 Check all s_endpgm instructions
The ROCR trap handler should check for all end program instructions
and not halt on them. Mask off the imm16 before comparing the
instruction to the s_endpgm opcode.

Change-Id: I669ffc7f5b699d7daf0c8ec5761ed7bb193f07a7
2020-05-04 19:52:53 -04:00
Matt Arsenault 5d6be5b808 Refer explicitly to python3 in shebang line
On Ubuntu 20.04, there is no more python or python2. Currently I get
this: /usr/bin/env: ‘python’: No such file or directory

Change-Id: Ib310b8aa7c1bd62973ef3cc8bcaf571831ad4435
2020-05-04 09:40:11 -04:00
Felix Kuehling e5062c4383 libhsakmt: Add PROT_NONE CPU mapping for scratch mappings
This is needed to allow gdb to access the memory.

Change-Id: I96c084b714e952d7b7000f0dd41e1c530fdd092f
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2020-05-02 15:52:30 -04:00
Sean Keely 3da81968cb Update addrlib with latest Mesa source.
Change-Id: Idd8cdaac9ad370397d62f6a32687ca7bc7d7462b
2020-05-01 20:33:09 -04:00
Sean Keely 1440da3e15 Remove dead code from image_manager_xx.cpp
Image swizzle mode will be set by the preferred surface info
function.

Change-Id: I41e639be53cafbb4db6cf15c159aa2bd457ec5be
2020-05-01 20:32:45 -04:00
Rachida Kebichi 72b0d25ea4 Added generation of hip ostream operators
Change-Id: I5d07ea07cdd94097cb44619c29d9deba54e5d6a5

ostream ops code cleanup

Change-Id: Ia4e287de1e1953f5d323a0066c29aa6056442139
2020-05-01 16:15:01 -04:00
Rachida Kebichi 2478e98644 Fix type cast from real to int
Change-Id: I8f1ac8cc884b57e0a46388303e18fd7ff2861b6c

resolve conflicts

Change-Id: Ie8259826fd71878aa314e7407c741c4c75c13c6e

Fixed format

Change-Id: I9730a59f79ad75f1eb55890b775bac1a46a82a1b
2020-05-01 14:44:16 -04:00
Chris Freehill 7624cc1008 Correct spelling of output message
Change-Id: Id7789e622ea76cc53c3be719798c3c1f90ede6e2
2020-05-01 13:22:50 -04:00
Matt Arsenault cd4b7cea85 Change check for /dev/kfd permissions
On newer kernels, it seems the group was changed from "video" to
"render". The check for video group misled me for quite some time, so
relax this check. Rather than specifically checking for video group
ownership, first see if /dev/kfd can be open as read-write. Then
diagnose whether the user belongs to the group that owns it, rather
than hardcoding the video group.

Change-Id: I9e65427363e9a5cdba802e09cee2f40fb80520ed
2020-05-01 10:14:21 -04:00
Sean Keely 7e3db20826 Move Images code to hsa-runtime folder
Change-Id: I53c1845d985ac3e9708d952865009c0021f3bb4f
2020-04-30 19:35:57 -05:00
Ramesh Errabolu 1a3ee2fd03 Update Image code base to use addrlib from mesa
Change-Id: I31355d7fc3db423c16772cf105e9b6b59a3a6307
2020-04-30 19:35:56 -05:00
Evgeny 3ce98d33d4 get_time API: make public; extende with more time id: coarse and raw; added time error return value;
Change-Id: I1641eb2c38915222204617e07fc0bfb388bb8346
2020-04-30 02:38:18 -05:00
Laurent Morichetti 00da82f951 Add debugger support for wave halted at launch
New trap handler ABI: Record in ttmp11[8:7] the event that caused the
trap handler to be entered. We currently record 2 events, trap_raised
if an s_trap instruction was executed, or excp_raised if an exception
(MEM_VIOL or ILLEGAL_INST) was raised.

Change-Id: Ie278c8277437b3b67c2737dcd1a12fe6511df428
2020-04-29 19:29:56 -04:00
Evgeny 2df34c40ea build_kernel.sh: adding a lookup for bitcode files
Change-Id: I1bd5790922b1365b1e53a75a7c7873ee2fd6b78a
2020-04-29 13:08:14 -05:00
Matt Arsenault 2e73d52ac6 Use -nogpulib in another place
Change-Id: I9cc1daa7db7d1f2ff07a0dbfb403dbf41f4bbffb
2020-04-28 13:46:01 -04:00
Matt Arsenault 0d84b66b1e Use -nogpulib as a quick build fix
Change-Id: I28ca7d53c76f0829719079dfb67b6314f5ff27cc
2020-04-28 10:08:37 -04:00
Evgeny fe70682184 toll destruction fix
Change-Id: If069c820526e21a0a4b80ac516f9669a81f34cab
2020-04-28 03:16:15 -05:00
Chris Freehill 806f665a85 Handle rsmi app running on machine with no AMD gpus
This fixes a seg fault that would happen in release builds when
there are no KFD nodes on a system, which occurs when there are
not AMD gpus present in the system. This use case occurs
for higher application code that is meant to be gpu agnostic.

Change-Id: If374930bc2e62f9898f337349cde3ebb16091ff0
2020-04-28 00:35:16 -04:00
Kent Russell 33133ebd07 CMakeLists: Support static building of hsa-runtime
Remove the hard-coding of "SHARED" as the lib type, and move any
SO-specific linking to only happen if the .so exists in the first place

Change-Id: I3f0bfd5c03f19b2425423b4dc8eed8fd87acc1d6
2020-04-27 20:52:07 -04:00
Sean Keely 675f73cda9 Adapt to new LLVM location in repo build.
This will reenable incremental PSDB builds.

Change-Id: I2311c124b06b544202f7c1db31b6607f2580194e
2020-04-27 17:58:35 -04:00
Evgeny 1d638b6f79 test suite minor changes
Change-Id: I673055c74461c106b4f705c209e54d83b7d3fb17
2020-04-27 13:05:47 -05:00
Kent Russell ddd38deab7 Make thunk lib type be defined by cmake
Make the hsakmt library take the value from CMake regarding
static/shared
KFDTest automatically grabs the right one due to it checking the normal
shared folders. Tested locally (and via automation by the time that this
is merged)
Also set the default to building SOs if BUILD_SHARED_LIBS is not defined

Change-Id: I7f8b76a7e60f3b41e5981f472b388301ae09e2c6
Signed-off-by: Kent Russell <kent.russell@amd.com>
2020-04-27 13:52:42 -04:00
Austin Kerbow 87202d4408 Update IsaRegistry for backend changes
Changes in the compiler are being made to add controls for XNACK and SRAM ECC
for all targets which can support these features. By default the conservatively
correct settings of XNACK on and SRAM ECC on will be used. This change is to
facilitate these backend updates.

Change-Id: I2fd6b6bc1d32937737e7f56d8e08c70fe781c745
2020-04-25 04:45:28 -04:00
Evgeny 0c7b397e63 using python3
Change-Id: Ic8ea29dd1aeb6fe5731f739a7f2f58414401ce7a
2020-04-24 14:51:09 -05:00
Evgeny 26d888fda4 minor change
Change-Id: I9ea899af4f8887677c52131bea502ab029f89cde
2020-04-24 13:56:08 -05:00
Kent Russell b72bbeac3e Fix naming conventions again for -dev package
Using the building OS isn't guaranteed, as we can theoretically build
RPMs in Ubuntu or DEBs in CentOS. Use CPack's DEB/RPM-specific variables
to get around this issue

Change-Id: I404246c070eac2c74b45ae4b763c612891d66de1
Signed-off-by: Kent Russell <kent.russell@amd.com>
2020-04-24 08:06:38 -04:00
Evgeny 990200988c fixing rocprof app exit code
Change-Id: Iff0d5fa66bc9a69e1a0bde9c85aa8c5e55b21834
2020-04-24 01:32:40 -05:00
Sean Keely 7712c7e743 Correct IPC fragment validation.
IPC create must only be used on whole ROCr allocations.
Fragments were allowing handle creation with offsets.

Change-Id: I1faa96d36bc7a6199bdc2e3ff1b8871d1a36a2fa
2020-04-24 00:08:53 -04:00
Evgeny 5531a38d02 loader verbose prints
Change-Id: I99fcdcb0f06b58071a0ff13fbe468c23f7698410
2020-04-22 23:10:05 -05:00
Evgeny b1e22e9c5e kfd wrapper ld preload fix
Change-Id: Icad86f08662208282790988611dbde0ec730162a
2020-04-22 23:03:48 -05:00
Evgeny 3173448638 run script update
Change-Id: Iffa971ff68f31c4c751698ad962ddc2993455d13
2020-04-22 21:29:32 -05:00
Evgeny 59f557cb5c build script updating to support hip/vdi
Change-Id: I7f398bd5f57aedb4ba0aeae3be4e6f051c011f5a
2020-04-22 12:02:21 -05:00
Evgeny 46fdb2ebef fixing cmake error message as fatal error
Change-Id: I9a378e1f70f77f2af8e53afe3abdb0b988b0f7bc
2020-04-21 22:34:14 -05:00
Sean Keely b90bf473c1 Correct capture of PoolInfo::allocable_size_.
Change-Id: I80757bb36048bc15b928220aca0a1eb5d898ab22
2020-04-21 19:03:24 -05:00
Evgeny 1e2d370eb5 cmake update
Change-Id: I42f1864f46c468072c7b536bb0b40946f69314a1
2020-04-21 00:24:11 -05:00
Evgeny d46e357aba changing hsa class rev
Change-Id: Ibd86f519c71edaca60fdc4f9cb7d9a230f5f3c6e
2020-04-20 14:32:28 -05:00
Evgeny 76d8115dbb adding GPU targets variable
Change-Id: I46849cb7a8bf769379bc14be0f8dcb782ae65a37
2020-04-20 13:14:53 -05:00
Evgeny 95d05100a7 HIP libraries static definition
Change-Id: I7cd45b491f35d5890246f8d4b1ce358f62b4c682
2020-04-20 12:38:02 -05:00
Evgeny e9045d889d adding KFD test
Change-Id: Ic9956b47c2cc7dc6643750ab88e97d4ee733fa4a
2020-04-20 09:57:59 -05:00