Wykres commitów

3905 Commity

Autor SHA1 Wiadomość Data
Tony Tye 783fe2e01b Delete roc::Program::hsaDevice
Delete roc::Program::hsaDevice and access directly from device
associated with program. This allows to be clear if the device is a
NullDevice which has no meaningful HSA agent backend device.

Change-Id: I81f96aff47bf9b8166d0ff6a5efc7c01f0fb6de3
2021-01-13 08:24:28 +00:00
Tony Tye c1ea70b539 Make roc::Device constructor and create() method private
Make roc::Device constructor and create() method private as creating
devices is performed by the factory static methods.

Change-Id: Ifa2edb8ec645b4ce6070c4aef355b9ef88294cf1
2021-01-13 08:24:28 +00:00
Tony Tye 30729a716f Check error return from aqlCreateHWInfo
Change-Id: If57c30d0605dc628d93a0d8131836ecde9834261
2021-01-13 08:24:28 +00:00
Tony Tye e5431676d4 Add stronger checking
- Add assertions to enforce that objects are of the correct kind and
  have been allocated.

- Make destructors check if objects have been allocated before
  deleting.

- Operations that require a non-NullDevice return failure if given a
  NullDevice.

- Use static_cast rather than reinterpret_cast when cohersing from a
  base class to a derived class.

Change-Id: I02ee0ea9d7982fd7ca29d49c9b02cfae111b7127
2021-01-13 08:24:28 +00:00
Tony Tye 001fd66cac Rename device access functions
Rename functions that access devices to reflect the derived device
they return. This includes the base device::Device and the derived
gpu/pal/roc device classes in both NullDevice and Device forms. Change
to use the least derived versions to clarify what operations will be
available.

Change-Id: I1abb6bfed7efa24852bc8d0d49acaea357d8b5d0
2021-01-13 08:24:28 +00:00
Tony Tye f679b05df7 Move declaration of kMaxAsyncQueues in rocdefs.h
Move declaration of kMaxAsyncQueues in rocdefs.h into the roc
namespace and adjacent to the other definitions.

Change-Id: Ibd319e3cc191945bacb9c06e1b31967717c1c87c
2021-01-13 08:24:28 +00:00
Tony Tye 8992f9e18d [NFC] Reorder some system includes alphebetically
Change-Id: I5245eb8482b447f6ce95e1c0b686d09ca7d20deb
2021-01-13 08:24:28 +00:00
Tony Tye 77268b2e60 Add virtual destructor to device::Settings
Add virtual destructor to device::Settings since derived classes are
allocated, but are deleted using the base class. This ensures the
descructors of the derived clsses will be executed if present.

Change-Id: I1f974b986193c60128009a768ec6b01b9deeacd5
2021-01-13 08:24:28 +00:00
Tony Tye a8d7e59dff [NFC] Move device::Info::targetId_ declaration
Move declaration of device::Info::targetId_ to be adjacent to the
other char* name fields.

Change-Id: Iefb249e801765a87b243a2a5e6997e78e817be2b
2021-01-13 08:24:28 +00:00
Tony Tye eb16dc5ef3 [NFC] Correct comments and line spacing
- Correct spelling mistakes or working in comments.
- Adding missing line separators.
- Add missing comments for namespace closing brace.

Change-Id: If09cdd38aa088b0f68f750dfdef81351eb8c4935
2021-01-13 08:24:28 +00:00
Tony Tye ed6d54b416 Ensure dump file names do not contain special characters
When TargetID is supported, the isa name will contain ':' characters
that are not legal in Windows file names. So replace all
non-aphanumeric or '+'/'-' characters with '_' to ensure the file name
will be legal on any file system.

Change-Id: I0b73a6188c186f75f1d2e8af19ade87667cbfe0b
2021-01-13 08:24:28 +00:00
Chauncey Hui dba4c06461 SWDEV-2 - Change OpenCL version number from 3241 to 3242 2021-01-13 03:00:06 -05:00
German Andryeyev 7d3aaa7a39 Explicit page table update on all devices
HMM with xnack enabled should automatically update page tables,
but currently it doesn't perform that. For now, runtime will
force page table update on all devices unconditionally.

Change-Id: Idfa6e1c145e6c114856214dce042b8a8349e5c58
2021-01-12 23:16:46 -05:00
Jason Tang 318eecfc87 Fix Windows 32bit build
Change-Id: Iab4a9a3f15c47d2c13d09ad098c52b21e078fd0a
2021-01-12 09:23:00 -05:00
Jason Tang 020da898b2 Remove incorrect assert
Change-Id: I7697c688c5c50a38d9d339971d4a03e9b57fcae4
2021-01-11 20:59:36 -05:00
Chauncey Hui e5b21c173c SWDEV-2 - Change OpenCL version number from 3240 to 3241 2021-01-11 16:57:11 -05:00
Tao Sang 4937fd7f0e Remove deprecated __HIP_ROCclr__
Change-Id: I19464fef82d5d24af7d4c46a80318a2922895bb8
2021-01-11 09:26:01 -05:00
Sameer Sahasrabuddhe e0ac6b4fc5 SWDEV-234709: redirect printf to stderr if specified by device code
The first qword in the printf messages is called the control
qword. If the LSB is set, then the output of the printf is now
redirected to stderr instead of stdout.

Change-Id: I391e04e6e8e0f231fda56f3a6e02703bf50e1924
2021-01-11 01:36:00 -05:00
German Andryeyev 8698aeef0d Add HSA signal global tracking logic.
Implement the global class for signals tracking per device queue.
Switch to the new tracking mechanism.

Change-Id: I3c4dda04b34e6d18d6a95510d84102909633b415
2021-01-08 12:57:33 -05:00
Satyanvesh Dittakavi a148a71075 SWDEV-264244 Fix StreamSync
Change-Id: I3a46a607a77aaf46dcd1fcf08db7e926613fe8d1
2021-01-08 02:06:31 -05:00
Sarbojit Sarkar 7648b2a61b SWDEV-264116: Optimize signal pool size
Change-Id: I4b9cef04d18fbbe453db924bcd88837c0e5924de
2021-01-06 02:14:23 -05:00
agodavar 69a786e8d1 SWDEV-245381 : Updated guarantee error messages to print based on BUILD_TYPE
Change-Id: Ia21039326b440f6d807a6495a9a05dd52b384c76
2021-01-05 05:49:09 -05:00
cjatin 7bcd555602 Removing ELF flags and moving them to HIP
Change-Id: I18464fef82d5d14af7d4c46a80318a2922895bb7
2021-01-04 13:43:33 -05:00
German Andryeyev d524514f6a Update comments in the code
Make sure the comments in the code match the actual behavior.
HDP read has internal HDP read cache and doesn't use L2.

Change-Id: I667a4643b0e0d6529008f5e1a0a3269456c55b4e
2020-12-17 09:43:23 -05:00
Sarbojit Sarkar 0e4b4255b2 SWDEV-262857: minor fix for D2D
Change-Id: Ica3cb9108e7a0d40d6a910f318df0a2420145603
2020-12-16 23:13:15 -05:00
Sarbojit Sarkar 673f483879 SWDEV-262734: Fix for Numa policy bug
Change-Id: I4be62c1fc45a59d09aa043af1c998b9e308da604
2020-12-16 11:22:32 -05:00
Vladislav Sytchenko f45cea29b7 [PAL] Clamp max image buffer size...
to the maximum size we can possibly create.

Change-Id: Iade51d84fdada4ae1299d9b2410d373a46357c66
2020-12-15 12:14:09 -05:00
Payam f134b90199 SWDEV-257937 - ROC_BARRIER_SYNC fix for missing SDMA flush
Change-Id: I93e8902bfcb16bac8ea594e16ea397b1ceafbd79
2020-12-15 00:54:33 -05:00
Jason Tang d4316141b7 SWDEV-263539 - More Target ID fix in GSL path
On behalf of Tony Tye. The bootleg passes CQE Baffin/Ellesmere test.

Change-Id: I4c21d21b3aaba360682ef15b8a4dda239f8af276
2020-12-14 16:48:55 -05:00
German Andryeyev 18a821acde Add L2 flush/invalidate after CPU copy
CPU read updates L2 with the latest values and requires
invalidation after, because SDMA doesn't use L2 and data can become
out of sync.

Change-Id: I98d1c91ca78a103fa5409e638f97485d62d5b11e
2020-12-11 23:05:49 -05:00
Jason Tang eef8405041 SWDEV-263539 - Support new Target ID in GSL path
Change-Id: I6827de93b10b312a1b78b69f5cf7d5b3d5bb1e31
2020-12-11 15:56:54 -05:00
German Andryeyev 88bd851f72 Move returned last command under the lock
Change-Id: I4a2b29a6beacd56ea38d91a33b3c5f8b763be3c7
2020-12-11 15:19:06 -05:00
Alex Xie 2505d68eba SWDEV-256126 - Linux pro Nuke app crash with "Out of memory"
Out of memory while running RIP plugin test

Change-Id: I8d6859a45b871f96ac027f8c7274f716e8524a3c
2020-12-10 11:44:54 -05:00
Saleel Kudchadker d0c35f1c40 Fix event reporting for AMD_DIRECT_DISPATCH
Change-Id: I2ff74b9470da976852228c30fefbd4abd8e1952b
2020-12-09 15:09:41 -05:00
German Andryeyev 1fde842703 Fix a deadlock in ROCr backend
When OCL ROCr backend performs CL_MEM_COPY_HOST_PTR it may attempt
to have access to amd::Memory object it's currently creating,
but it's not ready yet. The logic creates a temporary dummy object
to perform a copy transfer. The new change will make sure runtime
skips allocation of the same device::Memory object second time.

Change-Id: I14c6a00a3941fdcaa6aea299e9f096e4c3f5cadf
2020-12-09 13:23:17 -05:00
Sarbojit Sarkar f403b1c079 [SWDEV-259635] explicit allow_access for hipMemcpy2D
Change-Id: Ia3206c08f92f417dc486c5f0dd40474f77b473d9
2020-12-09 01:09:53 -05:00
Chauncey Hui 16c7f12078 SWDEV-2 - Change OpenCL version number from 3239 to 3240 2020-12-08 03:00:03 -05:00
Jason Tang b9520ce4cd SWDEV-263435 - Get code object version the correct way
Change-Id: I18877c116e2f013ec9d04411258c0df8cc0159b3
2020-12-05 15:51:26 -05:00
Chauncey Hui 5ce07e24d5 SWDEV-2 - Change OpenCL version number from 3238 to 3239 2020-12-05 03:00:03 -05:00
German Andryeyev 5b31c69a95 Add batch tracking for direct dispatch
Make sure the logic updates the command status when it's done in
HW, but not on submission.
Add the last command tracking, otherwise queue sync logic in the HIP
upper layer may skip synchronization, assuming the queue is empty.

Change-Id: I2d046792553e74df090a10f7d7a78914610f6df2
2020-12-04 10:16:17 -05:00
Chauncey Hui b334911a58 SWDEV-2 - Change OpenCL version number from 3237 to 3238 2020-12-04 03:00:03 -05:00
Saleel Kudchadker 59c6cb0268 Use barrier packets for event profiling
Use barrier packets for every profile marker that gets submitted
and use the completion signal to get GPU ts. This gives most accurate
dispatch time. Club cache flushes with profile marker if there is a
pending dispatch that needs cache flush. This optimization saves on
extra barrier and helps wall time

Change-Id: Ib62d6d7aabf4743827b561be6c9c5afa813203da
2020-12-03 13:45:14 -05:00
Chauncey Hui 36c328842f SWDEV-2 - Change OpenCL version number from 3236 to 3237 2020-12-03 03:00:04 -05:00
Jason Tang 054f256589 SWDEV-260632 - [PAL] Report correct Target ID
Change-Id: Ia39395e2c02e7c95b3df93be1f8030b4fa734583
2020-12-01 18:33:25 -05:00
Chauncey Hui e13577cc61 SWDEV-2 - Change OpenCL version number from 3235 to 3236 2020-12-01 03:00:03 -05:00
German Andryeyev e4f51e063b Disable worker thread creation for direct dispatch
Change-Id: I28f08ab9352310c9bf843fcb803a48f95ddf4676
2020-11-30 17:50:12 -05:00
German Andryeyev 4af8b53846 Enable GPU memory in HMM by default
Change-Id: Ifec4733dc7a932163d921ebe1ae9fbd594ea1ef2
2020-11-30 12:39:18 -05:00
German Andryeyev 08b846ae12 Remove obsolete terminate() method
Change-Id: I66b4a74f17977f1af320f402402a2f1b602e9911
2020-11-30 11:46:09 -05:00
Chauncey Hui 00832fe573 SWDEV-2 - Change OpenCL version number from 3234 to 3235 2020-11-28 03:00:04 -05:00
Jason Tang 87762850d3 Make the Target ID ELF definition only visible to HIP
Change-Id: I5a87bed806239839156cc4af56d339bfdefc90c6
2020-11-26 18:17:46 -05:00