Commit Graph

13474 Commits

Author SHA1 Message Date
Laurent Morichetti 008aa1c2e1 SWDEV-351980 - Use std::shared_mutex
Replace the custom reader/writer lock with the standard implementation
available in C++17.

Change-Id: I46013b821f13a023a16094830b7f45c4bacf11cb
2022-08-18 21:55:31 -04:00
Sarbojit Sarkar b39a56be25 SWDEV-2 - clean-up for hipMemset and other memset APIs
Change-Id: I0270be2843ee5f79c1c476cec7807c0b920869de
2022-08-18 12:04:16 -04:00
sdashmiz 50e0ddb055 SWDEV-350569 - add proper indexing for attribute
- rocr attribute needs to be updated after each iteration

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I3afb2d7954ef3de37f5f5f9d3cc7757fdacffcec
2022-08-18 09:59:42 -04:00
Jaydeep Patel adfb40ed42 SWDEV-351285 - Change error.
Change-Id: Ia841a24cf774b2e2d8f6b6e37f3d8f43cb73f8df
2022-08-18 07:07:56 -04:00
Chauncey Hui 4f6ecae248 SWDEV-2 - Change OpenCL version number from 3493 to 3494 2022-08-18 03:00:06 -04:00
Satyanvesh Dittakavi e147318403 SWDEV-351377 - hipIpcOpenEventHandle need not reset device ID
Change-Id: If4b4a3dbdd8016accc7fc083911cafa8bcb44154
2022-08-18 00:30:56 -04:00
sdashmiz 2c010dec17 SWDEV-325711: Add userobject functions for graph
- add user obj APIs for creating release and retain of user onbjects

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I0bf2999c77e44269565b27c31c7c1461f8a160a2
2022-08-17 14:31:43 -04:00
Laurent Morichetti a682934251 SWDEV-351980 - Acquire the code object lock in StatCO::getStatFuncName
Change-Id: I52ce2530d12fbe47e575feb2aab39bbfdfebd201
2022-08-16 19:43:15 -04:00
Konstantin Zhuravlyov ec63aa2302 SWDEV-350564 - Silence int-conversion warnings as errors
Change-Id: Ie7cf8bef0ce41df92369aa45c76493d5d0a6669b
2022-08-16 17:20:04 -04:00
Ajay 113cc9ae2a SWDEV-344168 - hipVmm functionality memory check fix
Change-Id: Ia1de96ac9dbcbfb6a94a234aec3bf6cb51961799
2022-08-16 11:04:56 -07:00
victzhan 252cda36fe SWDEV-343905 - Updated headers to match the khronos repository
Change-Id: Ic3aaa7194a45243cd3c7e0ed226e86ba4f0fbf2b
2022-08-15 22:08:09 -04:00
kjayapra-amd 9e9754be80 SWDEV-351508 - Change the data_kind to BC from FATBIN, since unbundling happens in runtime now.
Change-Id: Iaf6e85637edaa92171edc4edc650a0b4598bf625
2022-08-12 19:52:29 -04:00
Alex Xie aafa057c9a SWDEV-351337 - Add new asic id
Change-Id: Ie07f7a6b9a4bb797124e6644c91fb62ba014cf6b
2022-08-12 13:14:06 -04:00
Chauncey Hui bc301d0937 SWDEV-2 - Change OpenCL version number from 3492 to 3493 2022-08-12 03:00:07 -04:00
Jaydeep Patel 5b6ffb6380 SWDEV-351200 - Validate desc.
Change-Id: Ic8690c9a2134ca42f4bec626ca787587a32856fb
2022-08-11 07:17:21 +00:00
Sarbojit Sarkar db35b25d3f SWDEV-344210 - Fixed page fault when mempool accessed from remote device
Change-Id: I759296a3177560719759f7dd8766e07664285689
2022-08-11 00:02:29 -04:00
Jaydeep Patel 35051e778d SWDEV-351031 - Any bit other than the rightmost 4 bits shouldn't be set
Change-Id: I6c834f491ce393eb37259eabc603220c5b5f164e
2022-08-10 23:30:22 -04:00
Ajay b380a95597 SWDEV-348678 - hipManagedVar to initialize on all devices
Change-Id: Id714b56e89e4930ee067f3a7472a0029057d2711
2022-08-10 16:54:19 +00:00
Konstantin Zhuravlyov 6aa8066584 Merge "SWDEV-350564 - Silence int-conversion warnings as errors" into amd-staging 2022-08-10 12:34:55 -04:00
Victor Zhang 6e2ebb7051 Merge "SWDEV-339709 - Fixed OCLDeviceQueries failing on MI200" into amd-staging 2022-08-10 10:05:51 -04:00
Maneesh Gupta 289062682a SWDEV-350289 - Fix build warnings due to file re-org
Change-Id: I0066fa163b9f25fdde4c5b3baed1ef0654390c06
2022-08-10 03:05:56 -04:00
Chauncey Hui d9776dc730 SWDEV-2 - Change OpenCL version number from 3491 to 3492 2022-08-10 03:00:05 -04:00
Satyanvesh Dittakavi d12f205fd1 SWDEV-341992 - Add hipRefTex data types mapping on nvidia path
Change-Id: Icec2ec110f2647bfb4c571ff16dd3852cfc9fe4a
2022-08-10 02:45:25 -04:00
Sarbojit Sarkar a28b22d9b4 SWDEV-344210 - Fixed page fault when mempool accessed from remote device
Change-Id: Ie41b0c0499f7733d4541ccd50b3d0d976c6431c9
2022-08-09 23:26:27 -04:00
Konstantin Zhuravlyov 5407e18193 SWDEV-350564 - Silence int-conversion warnings as errors
Change-Id: Ib49471b90ee8f10f24ca0b56ee9fc1d0d78c30c6
2022-08-09 13:30:33 -04:00
Satyanvesh Dittakavi c33a6b4a03 SWDEV-350479 - Add missing hiprtcVersion symbol on Windows
Change-Id: Ifcb737adddade80ebe91a50812c96c585d7d3217
2022-08-09 03:15:12 -04:00
Satyanvesh Dittakavi 9299d5febb SWDEV-336448 - hiprtc dll versioning on windows
Change-Id: I6ab6f975bcd7cd2fb27d59d0860a6dbe8434970e
2022-08-09 00:50:21 -04:00
Chauncey Hui 1afcf53133 SWDEV-2 - Change OpenCL version number from 3490 to 3491 2022-08-06 03:00:07 -04:00
Anusha Godavarthy Surya 73021582d3 SWDEV-299940 - Query global memory available on device with HSA attribute HSA_AMD_AGENT_INFO_MEMORY_AVAIL
Change-Id: Ifcfb95f59d110b3b037a7131be21d5348601d2e2
2022-08-05 06:55:12 -04:00
Jaydeep Patel 638f9a7c0e SWDEV-348565 - Support for += operator.
Change-Id: I29045733de3906849e68b89c22e01badc9bd2b24
2022-08-05 02:59:39 -04:00
Jaydeep Patel 366050b14f SWDEV-346382 - Don't fall back to sync for hipMemcpyAsync from host to device.
Change-Id: I5aab9041f87c549a03c86e95a39bfa437126a99b
2022-08-05 02:32:55 -04:00
Ranjith Ramakrishnan d60787bdb2 SWDEV-349826 - Use get_filename_component rather than using file command to get realpath
The cmake file command with REAL_PATH option is supported from cmake version 3.19 onwards
Issue reported in cmake version 3.17. get_filename_component is supported since 3.4 onwards
The command gives REALPATH with symlinks resolved - /opt/rocm-ver/lib/cmake/hip/hip-config.cmake
So need to move four level up to get ROCM PATH
Verfied by printing the variables
Change made so that default initializaton of ROCM PATH is executed if there is no ROCM_PATH set in ENV

Change-Id: Ibfff584eeb154bd73a568a842f28143d5ed72458
2022-08-04 13:39:09 -07:00
sdashmiz 58c5e17c5f SWDEV-347595 - return proper error
- if flags are not supported

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Id7570d2c5f3d1169da33561f05c278dcd1834db6
2022-08-04 15:57:15 -04:00
Chauncey Hui c905dfd37e SWDEV-2 - Change OpenCL version number from 3489 to 3490 2022-08-04 03:00:05 -04:00
kjayapra-amd 4bba4faa0c SWDEV-346018 - Support unbundling of code object in runtime for hiprtc.
Change-Id: Idda30def999b28500738c7b48560d36ca6a8e730
2022-08-03 17:57:29 -04:00
Satyanvesh Dittakavi 958b97b433 SWDEV-2 - Fix hiprtcCompileProgram
- hiprtcCompileProgram should create isa with temp name when
  program name is not provided along with --save-temps option

Change-Id: I47974e2ac56336c851531622ff7d2a3ffb53455e
2022-08-02 16:16:31 -04:00
Sarbojit Sarkar 0444d20e07 SWDEV-338732 - Made hipMemset* default async
Change-Id: I0ebf6473b6825162fc828bb8cac47743e14ffd19
2022-08-02 07:14:57 -04:00
Sarbojit Sarkar 27a08a132f SWDEV-343921 - added Max stack size
Change-Id: I5c1a088e05215ca951afc9d92f8d298c5e3a65f1
2022-08-02 07:13:18 -04:00
Jaydeep Patel c61701323e SWDEV-329516 - Propogate hipErrorSharedObjectInitFailed from getStatFunc.
Change-Id: I60160f8d0c0dab20649a4e7c03448f4ae9a9c95b
2022-08-02 01:50:50 -04:00
Laurent Morichetti 9f09ca929e Improve hip_prof_api.h's readability
- Don't pass uint32_t arguments by reference.
- Use nullptr instead of NULL.
- Don't add frivolous typedefs.
- Use correct types when available instead of generic integral types.
- Make all roctracer callbacks extern "C" to prepare for a future change
  that will be removing their declaration from hip_runtime_api.h.
- Rename cb/sem sync and release functions -> reader_lock/writer_lock
  acquire and release.

Change-Id: If203fee077d421a9782fcd34607a413b8c3dcfc8
2022-08-01 17:11:50 -07:00
Laurent Morichetti 6f78083f2a Fix a race condition when setting the callbacks
When acquiring the reader's lock (sem_sync()...sem_release()), it is
possible for a writer to squeeze by if the reader goes into sync_wait().
The writer could re-acquire the entry.sync between entry.sem > 0 and
entry.sync = 0.

void sync_wait(uint32_t id) {
    sem_decrement(id);
    while (entry(id).sync.load()) {}
    // <--- HERE
    sem_increment(id);
}

This could result in both the reader and the writer accessing
{ callback, arg } at the same time, and the reader could read
inconsistent data, for example: { new callback, old arg }.

The solution is to re-test entry.sync when returning from sync_wait():

void sem_sync(uint32_t id) {
    sem_increment(id);
-   if (entry(id).sync.load() == true) sync_wait(id);
+   while (entry(id).sync.load() == true) sync_wait(id);
}

Change-Id: I22f74f4cb9a5f027aac8aa4ed3e633acc19df4b8
2022-08-01 20:03:10 -04:00
Sarbojit Sarkar e1f1e38d79 SWDEV-1 - cleanup
Change-Id: Ib50424c87cfc76317eb0c114b5dd3553d8ebd9eb
2022-08-01 00:05:58 -04:00
Chauncey Hui 2eeb00ba8a SWDEV-2 - Change OpenCL version number from 3488 to 3489 2022-07-30 03:00:06 -04:00
Tao Sang 9f9fd859db SWDEV-286739 - Support hipDeviceAttributeWallClockRate
Part 3: Add missing declaration of wall_clock64() to fix
compiling issue in device code.
Add querying hipDeviceAttributeWallClockRate.

Change-Id: Ie54771c2f58eeaacdc0248bc116ef193f99eb9b9
2022-07-28 13:02:42 -04:00
Anusha Godavarthy Surya 7b1c6d06d5 SWDEV-345683 - Fix HIP out of memory
If for every eventRecord handler is not submitted,
memory is not getting released during hipFree and leads to OOM.

Change-Id: I19b61a0c523502e9e1a3564ce8b791f3e2cea02c
2022-07-28 07:36:38 -04:00
Chauncey Hui 2e98e163a6 SWDEV-2 - Change OpenCL version number from 3487 to 3488 2022-07-28 03:00:08 -04:00
Ranjith Ramakrishnan f61a87ebb2 SWDEV-346857 - Find ROCM_PATH based on config file path rather than hardcoding
As per the requirements in SWDEV-287540, config files should not have hard coded /opt/rocm path
Instead of setting ROCM_PATH to /opt/rocm, used hip-config file path to find the rocm path
Validated by printing the CONFIG_PATH and is coming as/opt/rocm-ver/lib/cmake/hip/hip-config.cmake
So need four level up,with file name in the path

Change-Id: Iac01d3a0c0168138c777551165705ed56cf6c3b1
2022-07-27 15:46:07 -04:00
Maneesh Gupta d328d72fab Revert "SWDEV-264166 - Remove gcnArch"
This reverts commit ab303e6440.

Reason for revert: Moved out to future release

Change-Id: I36b046c8681371baa9e0ccb69d46dad633ee5706
2022-07-27 05:22:48 -04:00
Jaydeep Patel fa786c606a SWDEV-338376 - CUDA VMM API mappings
Change-Id: I47595dbf57fcce352d23842dbbc2b98b4ec97fb5
2022-07-27 02:35:13 -04:00
Jaydeep Patel efedf08327 SWDEV-329516 - Don't clear error if setKernels returns false.
Change-Id: I75f69bcdf01bad63a9273dc37afd69644f6b3b22
2022-07-27 06:01:00 +00:00