- 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
[ROCm/clr commit: c7e8d91e14]
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
[ROCm/clr commit: e0448535a3]
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
[ROCm/clr commit: 76c371d78a]
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
[ROCm/clr commit: 583dddf6b6]
- Use std::unique_ptr to levarage RAII for managing the allocation in
the presence of errors.
Change-Id: I55de515bbf72938e1dd09731c5e51f538cf9d34a
[ROCm/clr commit: 682774a09d]
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
[ROCm/clr commit: 08f3126f6c]
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
[ROCm/clr commit: 783fe2e01b]
Make roc::Device constructor and create() method private as creating
devices is performed by the factory static methods.
Change-Id: Ifa2edb8ec645b4ce6070c4aef355b9ef88294cf1
[ROCm/clr commit: c1ea70b539]
- 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
[ROCm/clr commit: e5431676d4]
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
[ROCm/clr commit: 001fd66cac]
Move declaration of kMaxAsyncQueues in rocdefs.h into the roc
namespace and adjacent to the other definitions.
Change-Id: Ibd319e3cc191945bacb9c06e1b31967717c1c87c
[ROCm/clr commit: f679b05df7]
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
[ROCm/clr commit: 77268b2e60]
Move declaration of device::Info::targetId_ to be adjacent to the
other char* name fields.
Change-Id: Iefb249e801765a87b243a2a5e6997e78e817be2b
[ROCm/clr commit: a8d7e59dff]
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
[ROCm/clr commit: ed6d54b416]
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
[ROCm/clr commit: 7d3aaa7a39]
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
[ROCm/clr commit: e0ac6b4fc5]
Implement the global class for signals tracking per device queue.
Switch to the new tracking mechanism.
Change-Id: I3c4dda04b34e6d18d6a95510d84102909633b415
[ROCm/clr commit: 8698aeef0d]
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
[ROCm/clr commit: d524514f6a]
On behalf of Tony Tye. The bootleg passes CQE Baffin/Ellesmere test.
Change-Id: I4c21d21b3aaba360682ef15b8a4dda239f8af276
[ROCm/clr commit: d4316141b7]
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
[ROCm/clr commit: 18a821acde]
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
[ROCm/clr commit: 1fde842703]
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
[ROCm/clr commit: 5b31c69a95]