Commit-Graf

3927 Incheckningar

Upphovsman SHA1 Meddelande Datum
Chauncey Hui 99da7ecba5 SWDEV-2 - Change OpenCL version number from 3247 to 3248 2021-01-24 03:00:07 -05:00
Jason Tang 1e08a3e0cd SWDEV-269147 - Disable ROC offline devices for now
Change-Id: I520f3c8e56db91cbc384d08beba4e0bd4626941d
2021-01-23 14:48:07 -05:00
Chauncey Hui 29596ac3be SWDEV-2 - Change OpenCL version number from 3246 to 3247 2021-01-23 03:00:04 -05:00
Jason Tang 64714fdbbe SWDEV-268345 - Enable address sanitizer build when ADDRESS_SANITIZER is ON
Change-Id: I09e5c5b2c21637bc67c23267411c2996ee57aad4
2021-01-22 16:21:50 -05:00
German Andryeyev ce2e5eba6b SWDEV-257787 - Reset active signal if ROCR call failed
- ROCR fails the call for some reason, then the signal will
become invalid and can hang on a wait. The logic will reset the
active signal in such cases

Change-Id: Ia131420200f1bbd7c9a162b8f1b06db8cecf41c6
2021-01-21 17:29:34 -05:00
Chauncey Hui de3e8b092c SWDEV-2 - Change OpenCL version number from 3245 to 3246 2021-01-20 03:00:06 -05:00
German Andryeyev 5a8946190a SWDEV-268381 - Enable wait on CPU before SDMA transfer
- There is a performance regression with a HW wait for HSA signal
on ROCr async operation. For now move the logic back to CPU wait.

- Fix profiling issue with multiple HSA signal per single timestamp
object. Some copies require multiple ROCR calls and if profiling is
required, then the execution time is derived from all used signals.

Change-Id: Id003e4abb8c2de378eedc152a7e389500fc6f4ce
2021-01-19 18:24:21 -05:00
Chauncey Hui 44659d5d7e SWDEV-2 - Change OpenCL version number from 3244 to 3245 2021-01-19 03:00:05 -05:00
Tony Tye c2308216dd SWDEV-268864 - Remove duplicatation of isa related information
Remove targetId_, gfxipMajor_, gfxipMinor_ and gfxipStepping_ from
device::Info as they are now available in device::Isa.

Change-Id: I381b1d4798ebf50655740e004a01ac7f86dbf668
2021-01-18 22:32:37 +00:00
Jason Tang c0730b69d5 Fix build error when building with clang++
Change-Id: If1c9fbd6af6028bd39ff43ee53d74d5e778e2a27
2021-01-18 09:45:19 -05:00
Jatin Chaudhary 9943fcd81b Adding compiler option to be passed to comgr
Change-Id: I6247cfc8f323e7ccbc95e35408ab3e8a55e16495
2021-01-18 06:25:44 -05:00
Chauncey Hui 97dd6c128b SWDEV-2 - Change OpenCL version number from 3243 to 3244 2021-01-15 03:00:06 -05:00
Saleel Kudchadker ce56d04dee Cleanup redundant Barrier packet fill function
Change-Id: I31f3250f00a362c2fdd35aca31df177fed7ddb98
2021-01-14 12:38:00 -05:00
Tony Tye 2026a24438 Make HSAILProgram::gpuNullDevice private
Change-Id: I822d1800eff0703a154dac997fe940d232eab542
2021-01-14 11:12:14 -05:00
Tony Tye c7e8d91e14 Update code object handling for GSL, PAL and ROCm
- Correct GSL path to report targets using the TargetID syntax.

- Correct GSL path to check compatibility of code objects when
  loading.

- Add concept of an device isa and create a registery used by ROCm,
  PAL and GSL.

- Support XNACK and SRAMECC target features consistently for PAL and ROCm.

- Correct logic for NullDevices and asserts to avoid memory coruption.

- Allow all NullDevices to be created for HIP.

- Numerous other code improvements.

Change-Id: I40abf3d2b22249c1492d1af5919665f8184f4e0e
2021-01-14 11:11:51 -05:00
Chauncey Hui 4c16051f6d SWDEV-2 - Change OpenCL version number from 3242 to 3243 2021-01-14 03:00:06 -05:00
Tony Tye e0448535a3 Use strncpy
Use strncpy instead of strcpy to ensure the arrays will not be
overflowered. Only copy one less than size of char array to leave a
NUL character at the end even if the copy is truncated provided the
original object is zeroed memory.

Change-Id: I00f7679630cf28dcb9a51cb0aba2810a4f4c72b9
2021-01-13 08:24:28 +00:00
Tony Tye 76c371d78a Make hsa_agent_t handles use pointer to device::Device
For roc devices create hsa_agent_t handles using a pointer to the
device::Device. This ensures each device has a different hsa_agent_t
handle. This may be necessary to ensure the loader symbol lookup will
search only symbols for the correct device.

Change-Id: Iee6dd40d68bf22a02ce8c75cbe5ac8f5a0d9e418
2021-01-13 08:24:28 +00:00
Tony Tye 583dddf6b6 Simplify handling of Settings
roc:Settings and pal::Settings are derivations. Allocate them as their
derived class then assign that to the base class member to avoid the
need for a static_cast.

Use device::settings to access the Settings consistently.

Change-Id: I0f85157962fbf6fed176da0caf83b723bcbe1452
2021-01-13 08:24:28 +00:00
Tony Tye f92b060707 Use properties() method consistently in paldevice.cpp
Change-Id: I8074ecc283dde57bddfabf72a439bf6132ee900e
2021-01-13 08:24:28 +00:00
Tony Tye 682774a09d Refine sampler handling
- Use std::unique_ptr to levarage RAII for managing the allocation in
  the presence of errors.

Change-Id: I55de515bbf72938e1dd09731c5e51f538cf9d34a
2021-01-13 08:24:28 +00:00
Tony Tye 08f3126f6c Make roc::Device::getBackendDevice non-virtual
Make roc::Device::getBackendDevice non-virtual and only defined by
roc::Device and not roc::NullDevice. It is only meaningful for an
online device.

Change-Id: Ic333a3a42f650bea524e80dab587a34f1353e593
2021-01-13 08:24:28 +00:00
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