Graphe des révisions

118 Révisions

Auteur SHA1 Message Date
German Andryeyev ce8dad2ecc SWDEV-290160 - Switch to global HSA signals
Runtime can't assign internal HSA signals for HIP events, because
HIP application can destroy the HIP stream or signal reuse may
occur internally. Switch to global HSA signals for HIP events.

Change-Id: Ieaea2d6b039e492b2e7c5112782a8f4e601e50a1
2021-08-22 23:56:07 -07:00
Saleel Kudchadker 8e08880cc3 SWDEV-247372 - Add logging for debug
Change-Id: Id5a27034005a7deba37072d8a4c6f250104a96c8
2021-08-22 23:56:07 -07:00
Sourabh Betigeri b2a1dc26ba SWDEV-286446 - This patch enables stream operations on vega10, vega20, MI100 and MI200
Change-Id: I6f07036d8ee6e4c6b55196a13288f8107488d824
2021-08-22 23:56:07 -07:00
German Andryeyev 85c70a7495 SWDEV-284671 - Add HW event wait to improve hipDeviceSynchronize
If AMD event contains a reference to a HW event, then runtime
could check/wait for HW event. CPU status update will occur later
after HSA signal callback, but it's not important for the result.

Change-Id: I591391a953bbdba6a25ac07e2cd98aeb17cd4596
2021-08-22 23:56:07 -07:00
German Andryeyev 89b69638d1 SWDEV-240804 - Update ReadMostly attribute
Switch HSA_AMD_SVM_ATTRIB_READ_ONLY to
HSA_AMD_SVM_ATTRIB_READ_MOSTLY to match Cuda. The new attribute
was just exposed in ROCr/KFD.

Change-Id: I2ee522d33c347ba52a4e272d2cd7f67960490cf7
2021-08-22 23:56:07 -07:00
German Andryeyev a9a1e21445 SWDEV-240804 - Add coarse grain memory support
Add an extension to memory advise to disable cache coherency for
better performance

Change-Id: I283703d81d9c36ddfa2c8fffa15eef60e2195056
2021-08-22 23:56:07 -07:00
kjayapra-amd 1c49d8816c SWDEV-286346 - Implement Arena Memory Object for externally created memory.
Change-Id: I8530602d89edf83ad367c52167e48a1559ee1e18
2021-05-18 10:59:52 -04:00
Jason Tang ed923eb12e SWDEV-269983 - Re-enable OpenCL Offline Compilation in ROCr path
Change-Id: I160c56a6964219c56c85ebeb5f475be535c39022
2021-05-18 10:46:46 -04:00
German Andryeyev 9b3072ae12 SWDEV-240804 - Switch SVM attribute for the first alloc
Use HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE flag for the initial
allocation instead of HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE_IN_PLACE.

Change-Id: Ia52fe205563df1ea916dc2dc81e749e11c16f83d
2021-05-18 09:32:29 -04:00
German Andryeyev 3f7a6b01e3 SWDEV-240804 - Remove AMD_HMM_SUPPORT define
Use dynamic logic for HMM based on it's availability

Change-Id: I63751d94571d5af6eb57bef2cb0e071120bfa103
2021-05-14 17:41:06 -04:00
Ravi C Akkenapally 93ae30730a SWDEV-286446 - StreamOperations: Enable for all gfx9
Change-Id: I913a31c8bfdf1031d4cd491f1c689aa4df05c02c
2021-05-14 16:15:27 -04:00
Brian Sumner 6d09a83b2d SWDEV-285332 - move common context into parent
Change-Id: I99ceb62ad948e1fa9d1dcaa5ede98626cc95bea7
2021-05-09 09:18:39 -07:00
Satyanvesh Dittakavi 88fca7bf9e SWDEV-281062 - hipIpcOpenMemHandle should return the base ptr
hipIpcOpenMemHandle should return the device pointer which is
similar to the base ptr of the original allocation even if the offset
to the original pointer is passed to hipIpcGetMemHandle

Change-Id: I99c0553e8c67c15b5fed880b6a4c74bce39c3aee
2021-04-22 02:59:05 -04:00
Vladislav Sytchenko cbeb372e46 SWDEV-280473 - Remove HSAIL support from the ROCm backend
In adition to removing the HSAIL logic from the ROCm backend, guard all
of the HSAIL includes in the common layer behind the WITH_COMPILER_LIB
define. This is to avoid including HSAIL headers when building with
no support for it.

In common logic replace the use of the aclType enum with the new
Program::file_type_t enum. This is essentially a local copy of the HSAIL
enum to avoid including any HSAIL headers.

Change-Id: Ica0651d1b29dfccc255cc584eb82a5cb35e1b520
2021-04-12 14:55:06 -04:00
Saleel Kudchadker aa38af8c96 SWDEV-276120 - Remove support for barrier sync
ROC_BARRIER_SYNC will not work with direct dispatch.
Remove and cleanup.

Change-Id: I81368b2e65039477bd0343bb92708dab48867db6
2021-04-07 17:08:39 -04:00
Sarbojit Sarkar d8d6c4e55d SWDEV-280089 - nullptr was getting added into MemObj
Change-Id: Ica56126156198140a143182de3d93d86730cadf1
2021-04-06 23:41:50 -04:00
German Andryeyev 8c513407af SWDEV-278346 - Replace assert with LogWarning()
ROCr returns some unexpected values and for now just return
invalid device back to the app

Change-Id: Ia6fb709ed2dc77d77bd5d64de80b41b3720bed76
2021-03-25 10:19:33 -04:00
German Andryeyev e9c484d1ce SWDEV-274145 - process ACCESS_QUERY for all devices
HIP requires to return AccessedBy query for all device, but ROCr
can process one per query. Hence send the queries for all
available devices and then accumulate the results in runtime.

Change-Id: I082f9adb8e31c775a8ad1bf7a5af37440ef4bd16
2021-03-08 14:19:13 -05:00
Jason Tang c13f9df42a SWDEV-1 - Change file mode back to 644
Change-Id: I433740d65c8f648e346107f6d8fa57d69463b713
2021-03-05 10:17:58 -05:00
kjayapra-amd 95e3a6d985 SWDEV-259566 - Adding support to retrieve handle for offsetted pointer.
Change-Id: I4a700c31a9ab481c4ea43923af57e83247555ab0
2021-03-04 12:28:59 -05:00
German Andryeyev fbde61de7f SWDEV-274199 - Enable SVM tracking
ROCr/KFD doesn't validate memory pointers. Enable validation inside
ROCclr, using SVM tracking mechanism.

Change-Id: I581e32ff37187f9ed8d9a302e8fd9f6ca935bdd7
2021-03-03 13:18:56 -05:00
Ravi C Akkenapally e94d482c8f SWDEV-179105 - Stream Operations: Add feature querying support
Change-Id: I01cb85223b83f3655e5e21ad16639da406e5cd3e
2021-03-02 11:02:15 -08:00
kjayapra-amd a7abe44436 SWDEV-270013 - Assign Kern_args segment only for gfx90a.
Change-Id: Icc890041eb27800cb78ef9e3d7bbe02658f53821
2021-03-02 11:07:37 -05:00
Vladislav Sytchenko c93f66a5ec SWDEV-270013 - Fix uninitialized variable warning
Change-Id: Ic4c8090e94e82798c294ac4532ca20efbc5a3a54
2021-02-23 11:49:28 -05:00
Vladislav Sytchenko 671778bdd3 SWDEV-232428 - Push hostcall implementation to the device layer
This change unifies the hostcall implementation for all the backends,
by pushing the common logic to the device layer. This is done by
replacing the use of hsa_signal_t with device::Signal (a light wrapper
around it).

Change-Id: I7b6fca7930b5a0b199da5d85e2e048354cc04e7b
2021-02-16 17:19:57 -05:00
Jason Tang c65be06c4c SWDEV-265304 - Disable GFX8 in LinuxPro ROCr build
Change-Id: Ia26bb025a133a4acb255a539a45668975019cc6e
2021-02-16 13:32:47 -05:00
Ravi C Akkenapally 0a5f9a3b10 SWDEV-179105 - Stream Operations: Add support for Wait and Write
Change-Id: Ibffa1d6d573826b64763da280074a77271d66808
2021-02-15 17:02:38 -08:00
kjayapra-amd 2df099df9e SWDEV-270013 - Allocate kernel_arguments from kern_arg & finegrain pool instead of coarse grain.
Change-Id: Id4c6977934fdd6ef2311f6e75593801f1e51983c
2021-02-15 18:20:08 -05:00
Payam a2e0b0495c SWDEV-257937 - Updated fix for ROC_BARRIER_SYNC=0
Change-Id: I7e28e541b654db57fb0890d7dbb7519cfb2d93db
2021-02-11 14:01:45 -05:00
German Andryeyev fb142e7b2f SWDEV-271806 - Disable pinning for views.
Only parent object should pin system memory

Change-Id: Ic9a0a34e3aff2263501c564c3cebd33f4f7e2455
2021-02-11 13:05:58 -05:00
Rahul Garg df0b14ff47 SWDEV-271182 - Fix HdpMemFlushCntl and HdpRegFlushCntl
Change-Id: Ib690b475c2c4514c862ded5fc2bdd1049e27bd46
2021-02-10 11:40:35 -05:00
German Andryeyev 6966d8098e SWDEV-269654 - Fix HIP stream busy query
- Avoid GPU wait on the marker submission and update the command
batch after HSA signal callback upon HSA barrier completion.

Change-Id: I5c1c97212aefc2ae4b99aa9e2a81627ee9a38c1c
2021-02-09 12:57:12 -05:00
kjayapra-amd 85fafb0561 SWDEV-270013 - Adding code to differentiate between kern_arg + fine_grain and fine_grain segment of system memory.
Change-Id: Id0404b2dab8561946ad0a90a77030582f7e021a4
2021-01-28 09:48:17 -05:00
Jason Tang 1e08a3e0cd SWDEV-269147 - Disable ROC offline devices for now
Change-Id: I520f3c8e56db91cbc384d08beba4e0bd4626941d
2021-01-23 14:48:07 -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
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
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 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 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 8992f9e18d [NFC] Reorder some system includes alphebetically
Change-Id: I5245eb8482b447f6ce95e1c0b686d09ca7d20deb
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
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
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
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
German Andryeyev 08b846ae12 Remove obsolete terminate() method
Change-Id: I66b4a74f17977f1af320f402402a2f1b602e9911
2020-11-30 11:46:09 -05:00
Aryan Salmanpour 72277c29b0 don't update maxComputeUnits_ if any exception occurs during conversion of global CU mask string
Change-Id: I7664809fe84d7422b18b1272ffeb642e03a39f1a
2020-11-23 09:51:19 -05:00
Aryan Salmanpour d03ee6eff6 Add an environment variable for setting a global CU mask
Change-Id: I773b152023c7b8e1e679a42015748f9b23fd946d
2020-11-20 10:05:09 -05:00
Jason Tang 1da0fe4263 SWDEV-254181 - Fix ocl min_max_image_buffer_size regression.
ROCr is now reporting the actual HW addressing limits for HIP, so OpenCL will have to impose lower limit.

Change-Id: I60c2ce27ed1d1f45f16fb76438965a236ba872c6
2020-10-26 09:15:31 -04:00
Jason Tang 25cc965c76 Change file mode 755 back to 644
Change-Id: I4ba5d66997ffd3331c56674d4bf805160dcdf049
2020-10-19 15:09:32 -04:00
Alex Xie e4e6c46356 SWDEV-251360 - Add tracing for memory allocation/free.
This can be used to debug VM fault

Change-Id: I7685485b0450ea84d10b710639ad7b6c5ec2fcf3
2020-10-15 15:38:55 -04:00