Граф коммитов

75 Коммитов

Автор SHA1 Сообщение Дата
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
Rahul Garg a224dc2a7b Fix PCI bus domain ID
SWDEV-256338

Change-Id: I09afdca4f1a08f99ce662a4c4ed8a51d85500699
2020-10-15 14:59:57 -04:00
Rahul Garg c0f8b52f06 Add image1DMaxWidth_ for maxTexture1D property
Needed by SWDEV-254068

Change-Id: Ic650dfb6e5b38d7544ba647c53de52deda39b92d
2020-10-14 17:30:43 -04:00
German Andryeyev c05de4f2f9 Add ROCr queries for HMM support
Change-Id: I2b5508bf0faf8f48dd7348d6a5202fb28de09876
2020-10-13 09:12:00 -04:00
German Andryeyev d9397590de Add option to skip AQL barrier
The change reuses HSA signals for dispatches as a wait signal.
Skipping the barrier requires to  disable L2 cache for sysmem
allocations and extra tracking for HDP access with the large bar.
ROC_BARRIER_SYNC=0 activates the new logic. Barrier sync is
still used by default.
ROC_ACTIVE_WAIT=1 enables unconditional active wait in ROCr.
The change also consolidated ROCr wait logic under single function.

Change-Id: I6bd1be30aa88258da1b1f9de319ef5a45852afd8
2020-10-06 08:37:12 -04:00
Sarbojit Sarkar 4a025e1a87 [perf]hipMalloc performance optimization
Change-Id: I6e8a918cc1c4cafad197b09e10755cd180e11ead
2020-10-06 03:19:41 -04:00
German Andryeyev df63547906 Add support for CPU device in advise
Change-Id: I7250e0183580c14cd3d6050ef85f9ce26e36f4a8
2020-10-05 12:52:46 -04:00
Tao Sang bc7291e85c Fix empty cpu agent on raven system
Change-Id: I30f5e65367613152ce96b80b13e1c9f2a28da807
2020-10-05 10:54:57 -04:00
Jatin Chaudhary d0f009a0ee Adding and populating available registers per cu value
Change-Id: Ide012038a9d74b20166ce1e69a9f2c0cbdce0d73
2020-09-28 05:30:23 -04:00
Aryan Salmanpour 2e199bd492 Fix a crash when printf used in a kernel launched on a stream with custom CU mask
SWDEV-249719 - root cause: queues with custom CU mask are not inserted
into queuePool_ (i.e., queue of reusable HSA queues) of ROC device class
causing a crash when creating hostcall buffers for printf

Change-Id: Ieee7005d9a5a30b3113394ce23ee65927126d0d6
2020-09-25 09:25:19 -04:00
Satyanvesh Dittakavi 90c694988b set free mem to zero avoding underflow
Change-Id: I964b41695fb41712624146c5959a35b37eacf52d
2020-09-18 11:56:57 -04:00
Jason Tang 740f1ba0aa SWDEV-252095 - Fix progvar_prog_scope_misc test Aborted (core dumped)
The progvar_prog_scope_misc test expects CL_DEVICE_MAX_MEM_ALLOC_SIZE to be multiple of integer.

Change-Id: Ic0690f5ab06ffa3feafb718beabbcf83ab53978c
2020-09-11 12:36:39 -04:00
Jason Tang 5ecce5c287 Remove gfxipVersion_ from device level
Change-Id: I11485beffdb9371a20d7abcaa1d1774c102db574
2020-09-07 11:33:49 -04:00
kjayapra-amd 0163d8acc0 SWDEV-240800 - P2P device attributes support
Change-Id: I2b060a66715f676dfb7136940e69e21288f509d8
2020-09-03 14:41:53 -04:00
Sarbojit Sarkar 8ac8384aea Fix for HIP_VISIBLE_DEVICE [SWDEV-247751]
Change-Id: Iff0ca6646f9d97b1ffa378c3cdc44159b6bf8ad0
2020-09-02 02:08:56 -04:00
Aryan Salmanpour d2b9d267b2 SWDEV-248499 Fix a crash when printf is used with cooperative kernels
root cause - cooperative queue is not inserted into queuePool_ (HSA queues) of ROC device calss causing a crash when creating hostcall buffers for printf

Change-Id: I3f9aceb4e5fe6a7c7a2a549a4bb0a3511fe02799
2020-08-25 16:51:34 -04:00
German Andryeyev 6e69258b69 Enable prefetch async functionality
Fix a typo with the name define, when compilation wasn't enabled.
Force CPU prefetch if system was forced in runtime

Change-Id: Id4b578f9fa44a45426fdb5d8ecb1da803aa42313
2020-08-13 11:09:10 -04:00
Jason Tang 7bb671fa55 Fix HSAIL build
Change-Id: I34209b3ae0ce0eefc30e464fd7f081a0b62449b0
2020-08-07 17:18:38 -04:00
Jason Tang f8f6bc16a1 SWDEV-246565 - Remove passing -msram-ecc to Comgr
Change-Id: I1604a0014186a5779561da3ec3eefec65aff5c37
2020-08-06 12:48:53 -04:00
Jatin Chaudhary 2f3df8e691 Adding device memory channel information
Change-Id: I47dfa3daff97b1e3f42484dde5a4aa64244ac544
2020-08-06 06:54:35 -04:00
Tao Sang fdef6f722f Apply constexpr on global constant varaibles
When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.

Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef
2020-07-22 22:14:13 -04:00
Tao Sang 214827defa Add numa lib detection in cmake
If numa lib is in building system, define ROCCLR_NUMA_SUPPORT to
support numa; otherwise, don't support numa.

Change-Id: I3848d7fdec5a3813ff1edad9b71ff04372dc0b9a
2020-07-21 14:58:56 -04:00
Jason Tang 8b7e0f3cfe SWDEV-232197 - Use HSA_ISA_INFO_NAME as the TargetID
TargetID will be passed to LC compiler.

Change-Id: I0385634922c11d53b57ebd596047698c47bda72b
2020-07-21 09:24:03 -04:00
Jason Tang 5e0bb5bd39 SWDEV-244000 - Print freeMem_ for memory accounting
Change-Id: I5bbce213236a109e9aa69766d2d4d370b58d0d08
2020-07-15 13:44:05 -04:00
kjayapra-amd 16e6b65b5c SWDEV-240165 - Move all amd::MemObjMap_ reference to ROCclr and only allow base ptr to get ipc handle.
Change-Id: I9de10a0c4ba4dee3b3c8b972966840ab807001d8
2020-07-09 21:19:45 -04:00
Jatin Chaudhary cd1e364911 Replacing deprecated HSA API calls with newer ones
Change-Id: Iebe2c00e717ab0e47c61611752b717966c719994
2020-07-08 00:32:24 -04:00
Aryan Salmanpour 4a901f3dd3 Always print error message with the returned error code before abort
Change-Id: I8479abc586937a50c90b2785c4ce7364e6e9732b
2020-07-07 16:28:30 -04:00
Aryan Salmanpour 34b82eb998 remove unused argument from enableHostcalls/disableHostcalls functions
Change-Id: I351a6b4e23cd9f118310c5c79b1afcb4758fde1b
2020-06-26 16:33:30 -04:00
Tao Sang da94cd0de1 Support numa policy set by user
Add hostNumaAlloc() to support numa policy set by user

Change-Id: Ib6c3e838aa53e3d9b3db9735c585df46a1c98944
2020-06-23 18:57:03 -04:00
Dittakavi Satyanvesh 7a3b8c6dd2 SWDEV-240566 adds error message before abort
Change-Id: I4dbd089daa5e6fde5e8722dc2395225dd822561c
2020-06-22 10:12:49 -04:00
Vlad Sytchenko 5b9af8f28d Fix some -Wunused-but-set-variable warnings
Change-Id: I281583b5abdfc09d5dd8b7dfb20b8821581db193
2020-06-15 17:51:01 -04:00
German Andryeyev afe825c506 Fix compile error in ATI make build
Change-Id: Id9d23b8f46bf1b97c0f02c8ae0edd94e6963b1b5
2020-06-15 10:31:57 -04:00
Tao Sang b14d9e0a36 Deduce hops from numa distance
Rocr won't return real hops so that we have to deduce hops from
numa distance as a workaround. This will be subject to change
as driver team will provide a long term solution in rocm3.7

Change-Id: Ifb939ed848db190c3d544bb7f30a5821161921e6
2020-06-13 17:04:17 -04:00
Jason Tang 30e36a4925 Get gpu asicRevision_
Change-Id: I8afb53e027d912843655823eebaec29901c33d28
2020-06-12 14:51:52 -04:00
German Andryeyev c5afd5d412 Initial HMM support
- Expose ROCclr interfaces for HIP usage
- ROCr interfaces aren't available in staging, thus control the
build with AMD_HMM_SUPPORT define

Change-Id: Iadc2bcc230e78d3b0dc22b235189c8cc80843446
2020-06-12 09:06:07 -04:00
Saleel Kudchadker 2b771d2f5f Add logging support for AQL packet
Use AMD_LOG_LEVEL=4 and AMD_LOG_MASK=8 to print AQL log
explicitly
Change-Id: I4209d91b460e64be44261d3ab773580067e47c29
2020-06-10 14:04:47 -07:00
Aryan Salmanpour 5203c5271b reuse available queue with the same priority if queue creation fails
Change-Id: I1522935ce1a73c4724135668d039e88a9097710b
2020-06-09 17:56:18 -04:00
Aryan Salmanpour 1d938697a1 fix a build error on TeamCity due to order of initialization in rocm Device class
Change-Id: I2e45e71e53272b7a7813422d3b949e3835077ab0
2020-06-08 13:56:39 -04:00
Aryan Salmanpour b5552aa97f Add support for setting queue priority for ROCm backend
Change-Id: I67ed5a6868af79538f7f4522d8d11c043cdf3c1e
2020-06-04 20:16:32 -04:00
Saleel Kudchadker 2b6fea4348 Fix a potential mem leak
If a offset of the pointer is passed to free it may release
the mem object but may not release from MemObjMap. Erase the map
by getting the parent pointer.
Change-Id: I06b92548de2d49b4029efe6b511329225007cc55
2020-06-04 14:05:11 -04:00
Tao Sang fabfc42b68 Fix TC linux build issue due to previous Numa patch
Change-Id: I6068edaf38cac6fad187c8429707afdb727e8d41
2020-06-03 16:42:53 -04:00
Tao Sang aedb9590be Support Numa-aware cpu selection
Select cpu in terms of the smallest Numa distance for a GPU device.
This will improve performance of hipMemcpy in the mode of
hipMemcpyHostToDevice or hipMemcpyDeviceToHost for small buffer.
`

Change-Id: I2860f1f83b79be0dff7bf5e64cf68ab4448db0a1
2020-06-01 21:01:24 -04:00
Aryan Salmanpour fec4adfd19 check for valid queue before accessing cuMask()
Change-Id: I8d4b0dbcd097c2ec5c31dea5a3d0060f0864a7e8
2020-05-20 16:23:09 -04:00
Chauncey Hui 0af9c06968 Modified IpcDetach to return status instead of void.
Change-Id: I68ed94b93f0383babe25eb046b4047d249a0fdc1
2020-05-20 03:38:21 -04:00