Граф коммитов

400 Коммитов

Автор SHA1 Сообщение Дата
Ramesh Errabolu 45958c727d Extend ROCr to surface UUID of GPU devices that suppport
Change-Id: I478db68d69a01578770403fa695f9e6391637573
2020-04-08 19:19:22 -05:00
Pruthvi Madugundu 241cdfdd01 Updating the hsa include directory symlink creation
- Symlink creation is corrected only for deb packages
- It is follow up package of http://git.amd.com:8080/c/hsa/ec/hsa-runtime/+/334403
- configure_file() is called to update the scripts with proper cmake variable values

Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
Change-Id: I0e833ead265166411e83593fd57265a9ab356904
2020-04-01 02:17:11 -07:00
Sean Keely f3b532b42d Fix Debian package build on CPack 3.10.
CPack now incorrectly adds two copies of directory symlinks when
building Debian packages.  This causes dpkg to see a file conflict
and fail installing.

The correct long term solution is to remove the symlink and use a
flat directory structure.  This patch adds the symlink in the post
install script as a workaround until we can switch to flat layout.

Change-Id: I879b6cbc2661c19df3db639cb42fba0972fddb93
2020-03-20 21:35:32 -05:00
Sean Keely a1c2439213 Update asserts and comments for pointer info.
Checks for an IPC memory error and updates comments relevant
to rocr_visible_devices.

Change-Id: I9d2f2dd27f3fa04881d17387cce2692bc046edb2
2020-02-24 09:08:48 -05:00
Sean Keely 9c35780836 Report HDP registers at all times.
HDP will now be used for coarse grain kernarg so needs to be
reported without consideration of fine grain vram over pcie.

Change-Id: I648167299faa583876a3d8685c3b3c4d8d31ebf9
2020-02-24 09:08:17 -05:00
Ramesh Errabolu 627991b1c1 Update how code references publicly available ROCr headers
Change-Id: I357c51eb713a23704d4fee71081be46a73a71806
2020-02-21 20:01:11 -05:00
Sean Keely dc165c92bc Add env key HSA_NO_SCRATCH_THREAD_LIMITER.
Setting to 1 prevents the scratch handler from reducing peak occupancy.
Scratch allocations that would normally reduce peak occupancy will
instead fail.

Diagnostic for TF and PyTorch.

Change-Id: I2d7ea47077eb5cf708251c8aa3fd183ad4261be0
2020-02-21 17:09:26 -05:00
Sean Keely 6c556002d8 Correct scratch retry logic.
scratch_used_large_ was uninitialized leading to the observed hang.
DynamicScratchHandler would wait for a large scratch release despite no
large scratch having yet been allocated.  Fixes .

The patch also removes a potential race between AddScratchNotifier and
ReleaseQueueScratch.  The race condition does not exist today since both
scratch alloc and release run on the same thread.  The changes will
prevent this potential race from manifesting if the async event handler
is ever updated to use multiple threads.

Also enhances scratch occupancy reduction reporting.  Reporting now
prints the initial request size as well as the allocated size and the
effect on occupancy this has.  Occupancy is computed in terms of the
requesting dispatch grid size so may be >100%.

Change-Id: I0fc5ee01467ff4c29bdd25d545177c97862c3bd9
2020-02-21 17:09:26 -05:00
Sean Keely d53fe07687 Insert zero sized pool on CPU agents without attached memory.
Ensures that all CPU agents will have a pool handle to allocate
system memory.  These pools will have no numa binding since the
node their owning Agent represents has no installed memory.

Change-Id: I9f72b455d633646839753c6719ff7f6a4c41f7c4
2020-02-21 17:05:10 -05:00
Saleel Kudchadker c57f3da1dc Reset link_map map in the constructor
Change-Id: I8a6ad3bc0fca790dec2992cacf9288068b3bcaa3
2020-02-19 15:29:35 -08:00
Pruthvi Madugundu e931fd424b Adding RUNPATH to find libhsakmt.so for Centos and SLES
- This new path is required when libhsaruntime.so is referred
from the top level ROCm lib directory.
- Once ROCm stack lib/lib64 structure is flatten, RUNPATH in all
the libraries needs to be updated.

Change-Id: I369131ce93e14958ec57a54701671f2bfd8d522a
Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
2020-02-14 17:43:29 -05:00
Sean Keely 3e9aca0f34 Support stripped binaries and remove unneeded attributes.
Attribute optimize(0) doesn't appear to be helpful helpful.  This
prevents optimization in the function but not at call sites to the
function.  The function may still be inlined since it has no side
effect (in some cases that we currently don't support).

Having a side effect prevents a call site optimization that allows
removal of a noinline function call with no side effect.  Call site
optimization should only happen (in GCC at least) when using whole
program optimization so this may be stronger than we strictly need.

Also added _amdgpu_r_debug to the exported symbol list (global) and
switched to the standard macro for an exported symbol (HSA_API).
Without being in the global list the debugger will not find this
symbol if the binary has been stripped.

Change-Id: Ieb00175ccc55fda4491deee44711cd55b3f24aeb
2020-01-21 20:08:02 -05:00
Freddy Paul 4b2256ac21 ADD libhsakmt.so RUNPATH for SLES
For SLES libhsakmt.so is located in <ROCm install>/lib64

Change-Id: I038dd80b65b4a493ac37981649b02f1b35caea88
2020-01-16 22:20:14 -05:00
Laurent Morichetti 19e1fb3a4e Fix a build error when compiling with clang
Check __clang__ before __GNUC__ as clang defines both.

Change-Id: I9963f8e0665efb4cb08bd3886fb38fee42dd9861
2020-01-15 18:52:53 -08:00
Srinivasan Subramanian 54d94d02bd Avoid shared library conflicts across multiple ROCM version
Adding patch number based on ROCM build/release to have unique
file name for libraries across multiple versions of ROCM.

Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>

Change-Id: I58d665b0e7d577b5bd7a6000d1202a0242672727
2020-01-15 01:08:23 -05:00
Qingchuan Shi d63886190f fix optimize(0) for clang.
Change-Id: I83bc57d42815f37445ae97bf6950147e3358ac45
2020-01-13 20:53:40 -05:00
Ramesh Errabolu be5782e198 Cpack rule encoding dependencies was broken
Change-Id: I2b8df7d255cdffd6b42713f0b59df2aeef83a607
2019-12-23 10:51:55 -06:00
Sean Keely 22a601292d Disable SDMA on gfx10.
Lack of cache controls only allow operating SDMA at
agent scope.  All copy APIs are defined at system scope so may
result in data errors.

Change-Id: I9cd10007defddcbf8feb14a2e3daa1ba17c0489f
2019-12-20 17:25:47 -06:00
Ramesh Errabolu d015d78de3 Support the building and packaging of legacy ROCr tools by itself
Change-Id: I2247bf7a46ee93495340f7b2603b09dc6b667443
2019-12-18 19:20:03 -06:00
Chris Freehill 4c22962024 Import PAL version of addrlib with initial gfx1xxx support
Change-Id: I439930a5cbf5b13a359ec164e75c6828af8c668d
2019-12-12 21:38:01 -06:00
Sean Keely 0a43a107b1 Initial GWS queue support.
Queues should transition to ref counting for all queues eventually.
That cleanup will be part of shared queue pooling support.

Change-Id: I217ff5d573156678b9559da6fb81baa8cd31c617
2019-12-09 21:21:17 -05:00
Ramesh Errabolu 144017e148 Add package dependencies for Images and Tools
Change-Id: Id77ba0e81d3b3e872153cdd7680338dd70319026
2019-12-06 16:38:21 -06:00
Sean Keely d2a50a0048 Allow disabling scratch reclaim.
Debug and RCCL NPI assist feature.

Change-Id: I2cb76f0a086fa341465df3ede26965ab713bc3b4
2019-11-20 02:41:58 -05:00
Sean Keely 35c1ffa863 Raise large scratch allocation limit for RCCL.
Temporary workaround for 2.10 release.  RCCL, compiler, or firmware
must be corrected and this code reverted before another ASIC release.

Change-Id: I27851353289b93df9acb72d28b8c6ccb9f7f7d7a
2019-11-20 02:41:27 -05:00
Laurent Morichetti 5774d9162b Fix a typo in INSN_S_ENDPGM_OPCODE encoding.
The correct s_endpgm instruction encoding is 0xBF810000.

Change-Id: I03f304762dcaced5bf3fa4f069da7a0b287d1cd2
2019-11-12 11:54:17 -08:00
Qingchuan Shi 16a20cfb8c Adding code object list in loader.
Change-Id: Iab3541287bd56276fd32615ee59fcd590de84ca0
2019-10-30 20:31:51 -04:00
Jay Cornwall 78e754935c Merge debugger trap handler into ROCr trap handler
Debugger path is taken for (trap_id >= 3) and single step exceptions.
Other traps/exceptions behave as before.

Change-Id: I276c0eb69953709968353a57717ee017d22348a2
2019-10-30 13:56:06 -04:00
Sean Keely 851ee799c4 Correct strip command.
Strip should only apply to the output target library.  Symlinks
with .so endings which will be relocated during install will cause
strip to fail, aborting the build.

Change-Id: Ieb598c2cec5277d9d14c8afa88b91ca2c7f4412d
2019-10-30 01:24:43 -05:00
Sean Keely 6c3acda664 Adapt to new versioning.
Using branch point for count since last change since we don't
have questions answered on tags yet.

Removed unused CMake files.
Restructured CMake to use the cache rather than only commandline
and be ccmake & cmake-gui friendly.
Dependency search paths are added for the Repo tree layout.

Search paths still needed for install paths.

Simplified packaging.  hsa-ext-rocr-dev package and contents now
build from the package CMake rather than being 3 separate projects.

Not applying new version number or new install paths!

Change-Id: Ibea50dc8a6ab091e91857f78833f5379a4511547
2019-10-29 04:21:17 -05:00
Jay Cornwall 906cd84186 Disable SDMA HDP flush on gfx10
Not currently functional, triggering SRBM write protection.

Change-Id: Ib0b832357e3df5a6a0d0b46648515ec9bd70f017
2019-09-14 14:08:47 -04:00
Jay Cornwall e0358d7dc2 Set MTYPE field in SDMA fence command on gfx10
This is the only SDMA command with an MTYPE field.

Change-Id: Ice146ace9c3e8e7aff038e1e004be73c070f48fe
2019-09-14 14:07:57 -04:00
Jay Cornwall 32a9a5dbb0 Add gfx1010, gfx1011, gfx1012 ELF types to loader
Change-Id: I23a1159fb10f60881ea6830ba13ee73bd373bfc9
2019-09-14 14:07:16 -04:00
Jay Cornwall 5b64fbd0e5 Implement code cache (SQC I$, SQC K$, TCP, GL1, GL2) invalidation for gfx10
Change-Id: I8b2a59118094fbb55e3f575fa9f79959d3725d7d
2019-09-14 14:06:31 -04:00
Jay Cornwall d1c5a079cd Add binary shaders for gfx10
Change-Id: Iaf586a15a2f2aebc266da5148aa8637b092c1002
2019-09-14 14:05:35 -04:00
Chris Freehill 0afe6618a6 Add gfx10,11,12 old to new name format conversion
Change-Id: I792c840d8d819d1d48f95fc4167b2e25c6beec23
2019-09-14 10:37:19 -04:00
Jay Cornwall f8d0ccd159 Support wave32/wave64 scratch allocations on gfx10
- Use new buffer resource descriptor layout
- Handle wave32 scratch allocation error from CP
- Make wavefront size a property of scratch allocation requests
- Repurpose wave64-specific amd_queue_t.scratch_workitem_byte_size field
- Clear index_stride field in V# on gfx10, calculated per-dispatch by CP

Change-Id: If2acdf6430772abd4d6a8c792fc8c11260764dda
2019-09-13 17:22:59 -04:00
Chris Freehill 08841faf4c Update addrlib to pull in gfx10
This is mostly un-edited from Perforce. We will make other required
edits in future commits.

Change-Id: I55a809f2f23f03d60e4dcd1fb947ad558e737027
2019-09-13 11:44:23 -04:00
Chris Freehill 0ec781478d Make gfx10 use OSS defined packet fields
Change-Id: Icf622c22a17005aaeafb24f80a414319bebb891f
2019-09-13 08:14:24 -04:00
Chris Freehill b104031628 Add gfx10 as a target ID
Change-Id: Ib9a78776af9f26ff9278a06b059cb8b7ee216ee2
2019-09-12 20:24:40 -05:00
Chris Freehill 6ebdad5896 Initial support for gfx1010, gfx1011, gfx1012
Change-Id: I9ec398070c85db08aea72947557c6e1b5f7d541d
2019-09-12 20:24:30 -05:00
Sean Keely f2599fccb6 Enable trap handler on APUs.
Change-Id: Ifdc8c2782498b3fbe238d773120d378c47918d07
2019-09-06 18:10:20 -04:00
Sean Keely f9d3796db8 Correct doorbell_queue_map allocation.
doorbell_queue_map should always be allocated or we will need to
add branches around all accesses.

Change-Id: I994c0eaf4be62c1a4a37bd06894272dba1fc1da6
2019-09-06 18:10:20 -04:00
Christian Sigg 00b0ee15b3 Add missing include to lazy_ptr.h
Change-Id: I5b061692a4ec6def631d7c3182e5b644b6b9c519
2019-09-05 02:44:27 -04:00
Christian Sigg 1f177cf9c2 Change #include of libelf.h from quote to angle.
Change-Id: Ie940ed0f78e95224e42978381c552861e6d58ee4
2019-09-05 02:43:54 -04:00
Christian Sigg 912c23a6d5 Adding missing includes to sdma_registers.h
Change-Id: Idb2a54f45c810508ae0ebac0ca12853df8025c7a
2019-09-04 20:15:13 -04:00
Sean Keely ec5ac95dce Remove sdma ts pool.
sdma end ts must be 256 bit aligned in oss 3.0 and prior.  Using
the ts pool requires copying into the signal and is a significant
performance penalty for small copies.

SharedSignal is 128 bytes due to alignment so can host the end ts.
Move sdma end ts into SharedSignal and remove ts pool and ts copy.

Change-Id: I7899bda36ebc9adcaad1d3a3d2b7a489857cc9e8
2019-08-29 20:24:05 -05:00
Sean Keely 5adb73fffd Allow default kernel to spin freely at first.
Impacts GPU_ONLY signal type latency when waiting for small operations.
Using this type improves total SDMA small copy performance by ~40% if
the signal is allowed to spin freely.

Change-Id: I27aa128c63a1bacb3f51fb08f166e4e1d6fef651
2019-08-29 02:46:56 -05:00
Sean Keely ea8c99f452 Correct copy completion signal handling.
Remove agent lookup in time stamp translation for IPC signals.  The copy
agent handle is not shared so does not need to be checked for cross
process use.  Cross process copy-timestamp read is illegal and continues
to deliver garbage.

Store the copy agent properly when doing CPU-CPU copies.

Change-Id: Ib4008f66ff866922047749dd556c84a32021c1fd
2019-08-29 02:46:56 -05:00
Sean Keely 8133563a93 Enable HDP flush for all gfx9+ clients.
ucode versions are per asic so not valid for feature enablement outside
of bringup/dev.  Feature is older than the latest ioctl change that
the thunk depends on so use of this patch with kernel packages that
don't contain the feature is not possible in a supported environment.

Change-Id: I36b14176a7d642017ef1518aeade454b0f3dc749
2019-08-29 02:46:56 -05:00
Sean Keely 4647a5454d Allow concurrent copies in blit kernel path.
Also removed an unnecessary cache flush in dependency barrier packet.

Change-Id: I573df3bdf0a10df0bcd78025672c44038f8091ff
2019-08-29 02:46:56 -05:00