Commit Graph

61 Commits

Author SHA1 Message Date
Jatin Chaudhary 2a16ef5d04 Adding and populating available registers per cu value
Change-Id: Ide012038a9d74b20166ce1e69a9f2c0cbdce0d73


[ROCm/clr commit: d0f009a0ee]
2020-09-28 05:30:23 -04:00
Aryan Salmanpour b01d49542c 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


[ROCm/clr commit: 2e199bd492]
2020-09-25 09:25:19 -04:00
Satyanvesh Dittakavi c667dc6fa0 set free mem to zero avoding underflow
Change-Id: I964b41695fb41712624146c5959a35b37eacf52d


[ROCm/clr commit: 90c694988b]
2020-09-18 11:56:57 -04:00
Jason Tang 61c85339c3 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


[ROCm/clr commit: 740f1ba0aa]
2020-09-11 12:36:39 -04:00
Jason Tang eaf65e59ae Remove gfxipVersion_ from device level
Change-Id: I11485beffdb9371a20d7abcaa1d1774c102db574


[ROCm/clr commit: 5ecce5c287]
2020-09-07 11:33:49 -04:00
kjayapra-amd bfaa8f8ab5 SWDEV-240800 - P2P device attributes support
Change-Id: I2b060a66715f676dfb7136940e69e21288f509d8


[ROCm/clr commit: 0163d8acc0]
2020-09-03 14:41:53 -04:00
Sarbojit Sarkar a5c2a7ff84 Fix for HIP_VISIBLE_DEVICE [SWDEV-247751]
Change-Id: Iff0ca6646f9d97b1ffa378c3cdc44159b6bf8ad0


[ROCm/clr commit: 8ac8384aea]
2020-09-02 02:08:56 -04:00
Aryan Salmanpour 771a8abb90 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


[ROCm/clr commit: d2b9d267b2]
2020-08-25 16:51:34 -04:00
German Andryeyev a5ca15a599 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


[ROCm/clr commit: 6e69258b69]
2020-08-13 11:09:10 -04:00
Jason Tang d4cbe1a339 Fix HSAIL build
Change-Id: I34209b3ae0ce0eefc30e464fd7f081a0b62449b0


[ROCm/clr commit: 7bb671fa55]
2020-08-07 17:18:38 -04:00
Jason Tang 04054e9b60 SWDEV-246565 - Remove passing -msram-ecc to Comgr
Change-Id: I1604a0014186a5779561da3ec3eefec65aff5c37


[ROCm/clr commit: f8f6bc16a1]
2020-08-06 12:48:53 -04:00
Jatin Chaudhary ba5507f650 Adding device memory channel information
Change-Id: I47dfa3daff97b1e3f42484dde5a4aa64244ac544


[ROCm/clr commit: 2f3df8e691]
2020-08-06 06:54:35 -04:00
Tao Sang 44eb207f8d 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


[ROCm/clr commit: fdef6f722f]
2020-07-22 22:14:13 -04:00
Tao Sang 10f1bfc765 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


[ROCm/clr commit: 214827defa]
2020-07-21 14:58:56 -04:00
Jason Tang cd1ee42c36 SWDEV-232197 - Use HSA_ISA_INFO_NAME as the TargetID
TargetID will be passed to LC compiler.

Change-Id: I0385634922c11d53b57ebd596047698c47bda72b


[ROCm/clr commit: 8b7e0f3cfe]
2020-07-21 09:24:03 -04:00
Jason Tang e69ff5e142 SWDEV-244000 - Print freeMem_ for memory accounting
Change-Id: I5bbce213236a109e9aa69766d2d4d370b58d0d08


[ROCm/clr commit: 5e0bb5bd39]
2020-07-15 13:44:05 -04:00
kjayapra-amd adb0ce1c43 SWDEV-240165 - Move all amd::MemObjMap_ reference to ROCclr and only allow base ptr to get ipc handle.
Change-Id: I9de10a0c4ba4dee3b3c8b972966840ab807001d8


[ROCm/clr commit: 16e6b65b5c]
2020-07-09 21:19:45 -04:00
Jatin Chaudhary 260a83c546 Replacing deprecated HSA API calls with newer ones
Change-Id: Iebe2c00e717ab0e47c61611752b717966c719994


[ROCm/clr commit: cd1e364911]
2020-07-08 00:32:24 -04:00
Aryan Salmanpour 8d083a3c61 Always print error message with the returned error code before abort
Change-Id: I8479abc586937a50c90b2785c4ce7364e6e9732b


[ROCm/clr commit: 4a901f3dd3]
2020-07-07 16:28:30 -04:00
Aryan Salmanpour 934763278b remove unused argument from enableHostcalls/disableHostcalls functions
Change-Id: I351a6b4e23cd9f118310c5c79b1afcb4758fde1b


[ROCm/clr commit: 34b82eb998]
2020-06-26 16:33:30 -04:00
Tao Sang 9273cfaa15 Support numa policy set by user
Add hostNumaAlloc() to support numa policy set by user

Change-Id: Ib6c3e838aa53e3d9b3db9735c585df46a1c98944


[ROCm/clr commit: da94cd0de1]
2020-06-23 18:57:03 -04:00
Dittakavi Satyanvesh b7801b2035 SWDEV-240566 adds error message before abort
Change-Id: I4dbd089daa5e6fde5e8722dc2395225dd822561c


[ROCm/clr commit: 7a3b8c6dd2]
2020-06-22 10:12:49 -04:00
Vlad Sytchenko 0b3fc7bc5d Fix some -Wunused-but-set-variable warnings
Change-Id: I281583b5abdfc09d5dd8b7dfb20b8821581db193


[ROCm/clr commit: 5b9af8f28d]
2020-06-15 17:51:01 -04:00
German Andryeyev cfe7062be1 Fix compile error in ATI make build
Change-Id: Id9d23b8f46bf1b97c0f02c8ae0edd94e6963b1b5


[ROCm/clr commit: afe825c506]
2020-06-15 10:31:57 -04:00
Tao Sang e3c1bb153b 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


[ROCm/clr commit: b14d9e0a36]
2020-06-13 17:04:17 -04:00
Jason Tang e762c29a30 Get gpu asicRevision_
Change-Id: I8afb53e027d912843655823eebaec29901c33d28


[ROCm/clr commit: 30e36a4925]
2020-06-12 14:51:52 -04:00
German Andryeyev 0a6056ac82 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


[ROCm/clr commit: c5afd5d412]
2020-06-12 09:06:07 -04:00
Saleel Kudchadker fca301772c Add logging support for AQL packet
Use AMD_LOG_LEVEL=4 and AMD_LOG_MASK=8 to print AQL log
explicitly
Change-Id: I4209d91b460e64be44261d3ab773580067e47c29


[ROCm/clr commit: 2b771d2f5f]
2020-06-10 14:04:47 -07:00
Aryan Salmanpour a760a90d35 reuse available queue with the same priority if queue creation fails
Change-Id: I1522935ce1a73c4724135668d039e88a9097710b


[ROCm/clr commit: 5203c5271b]
2020-06-09 17:56:18 -04:00
Aryan Salmanpour 6059c30804 fix a build error on TeamCity due to order of initialization in rocm Device class
Change-Id: I2e45e71e53272b7a7813422d3b949e3835077ab0


[ROCm/clr commit: 1d938697a1]
2020-06-08 13:56:39 -04:00
Aryan Salmanpour 55c58ebfaa Add support for setting queue priority for ROCm backend
Change-Id: I67ed5a6868af79538f7f4522d8d11c043cdf3c1e


[ROCm/clr commit: b5552aa97f]
2020-06-04 20:16:32 -04:00
Saleel Kudchadker 0bdb497c1a 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


[ROCm/clr commit: 2b6fea4348]
2020-06-04 14:05:11 -04:00
Tao Sang a0506189a1 Fix TC linux build issue due to previous Numa patch
Change-Id: I6068edaf38cac6fad187c8429707afdb727e8d41


[ROCm/clr commit: fabfc42b68]
2020-06-03 16:42:53 -04:00
Tao Sang 6041b06b61 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


[ROCm/clr commit: aedb9590be]
2020-06-01 21:01:24 -04:00
Aryan Salmanpour 009eed8763 check for valid queue before accessing cuMask()
Change-Id: I8d4b0dbcd097c2ec5c31dea5a3d0060f0864a7e8


[ROCm/clr commit: fec4adfd19]
2020-05-20 16:23:09 -04:00
Chauncey Hui d400543947 Modified IpcDetach to return status instead of void.
Change-Id: I68ed94b93f0383babe25eb046b4047d249a0fdc1


[ROCm/clr commit: 0af9c06968]
2020-05-20 03:38:21 -04:00
Jason Tang f94e958680 Add major/minor/stepping to device layer
Change-Id: If82ea55a46b166b243a98089a6e9c40ccfdb479f


[ROCm/clr commit: cd2a713d63]
2020-05-17 12:57:34 -04:00
Aryan Salmanpour dee687d2d7 Add support for setting CU mask on ROCclr for ROCm backend
Change-Id: I0dbe2eeb33467fc0f24b26929119c10e9b455da7


[ROCm/clr commit: fed94b8604]
2020-05-15 14:23:43 -04:00
Saleel Kudchadker c38c8e5c3d Add env var to toggle large bar support in runtime
Use ROC_ENABLE_LARGE_BAR (0/1) to toggle. The support is
enabled by default.

Change-Id: I6cb93a46594cb6f5e90bf6057738330225efb553


[ROCm/clr commit: d10d691e76]
2020-05-12 13:20:06 -04:00
Jason Tang e49bddae07 device/rocm: split gfxVersion to major/minor/stepping
Change-Id: I1e437eaee30794147713d9516229211670f01d90


[ROCm/clr commit: b4f1239f34]
2020-05-12 12:17:13 -04:00
German Andryeyev b5f464e2af Make sure the list of HSA agents is valid
If HIP_VISIBLE_DEVICES is active, then make sure the list of HSA
agents contains the valid agents

Change-Id: I584aad999a230ab7f88a0cfe20dcd0abe79c43a5


[ROCm/clr commit: ae4aceb55e]
2020-05-11 15:49:30 -04:00
Christophe Paquot f03339a1e2 Fix cooperative flag for hsa_queue creation in case they're not available
SWDEV-233766

Change-Id: If410ecfed61f2b3bb50b847cf2ededc573139494


[ROCm/clr commit: 3ed185307e]
2020-05-11 13:40:50 -04:00
Michael LIAO b785d25506 Clear executable permission.
Change-Id: Ia0d363b1ba89d7947e5b5a55cb67edba86f0515e


[ROCm/clr commit: 503ef06555]
2020-05-07 10:38:58 -04:00
Alex Xie 1e75874295 SWDEV-234684 - hipmemcpy optimization does not work in tests
Change-Id: I899d172c5b2af88c796fe9a36f97d15ac45caf94


[ROCm/clr commit: bfbc8cd09b]
2020-05-05 15:58:03 -04:00
Saleel Kudchadker c6d4b16980 Disable small copy optimization for now
Change-Id: Ib7a4aa676bb60940e067c985eb19070bd63b2fc2


[ROCm/clr commit: 0fbc0a895b]
2020-05-05 11:52:42 -04:00
Alex Xie a97194485a SWDEV-232894 Port hipMemcpy optimizations from HCC to VDI
Apply the optimization to change for OpenCL too.
Clean up some unnecessary checks.

Change-Id: I840261fe35baeeadeba7388e86779d482f509aad


[ROCm/clr commit: 6c5a42b33c]
2020-04-30 11:06:28 -04:00
Christophe Paquot 2b3875882f Couple of cleanups.
Remove queue limitation since we loop through HW queues now.
Add a DevLogError if we fail to create the hsa_queue. A ticket showed a regression there.

Change-Id: I4f58e405f88e75600a762f6d6352838c969cdb5e


[ROCm/clr commit: b54c3f7db9]
2020-04-29 09:18:07 -07:00
agodavar d6275e96d9 P2PStating buffer allocation when P2P is not enabled between all GPUs
SWDEV-232580 & SWDEV-232580
Allocate p2p statging buffer when full P2P access is not available between all devices.
p2p staging buffer will eventually be used when required.

Change-Id: If8490ba7b1c52c432c1e942ae95421b9d2ec7097


[ROCm/clr commit: f149fe0803]
2020-04-28 07:10:57 -04:00
Alex Xie c158b9b3d0 SWDEV-232894 Port hipMemcpy optimizations from HCC to VDI
Change-Id: I6bebe9ac503a9f80d067aeea8a848409ad210338


[ROCm/clr commit: 009d0b5f55]
2020-04-27 14:53:58 -04:00
German Andryeyev 0567dd299a Don't attempt to reuse the cooperative queue
Change-Id: I0e98e292a562715a7b395118f899af859f3e42bb


[ROCm/clr commit: 082cbfa1f5]
2020-04-27 09:18:05 -04:00