Gráfico de commits

1086 Commits

Autor SHA1 Mensaje Fecha
Tao Sang d967be8eeb Support hipFuncGetAttributes with hip-clang+Hcc RT
Fix issues of missing kernel function symbols and missing argument list via
using __hipRegister* functions.
Then the following tests can pass,
directed_tests/runtimeApi/module/hipFuncGetAttributes
directed_tests/runtimeApi/module/hipExtLaunchMultiKernelMultiDevice
directed_tests/gcc/LaunchKernel

Change-Id: I52135b61e8283eb4f9f10f77895151e4e55418d9
2020-03-26 23:28:35 -04:00
Tao Sang d432dbfe20 Fix failure to get global variables
Implement _ihipGetGlobalVar() and ihipGetGlobalVar() to
get global variables.

Change-Id: I442ab6712e12306c3316f114f5dc42f6daefaad9
2020-03-17 16:14:16 -04:00
Lad, Aditya d80edf9541 Merge branch 'master' into amd-master-next
Conflicts:
	CMakeLists.txt
	tests/src/texture/simpleTexture2DLayered.cpp
	tests/src/texture/simpleTexture3D.cpp

Change-Id: I4aa4754d391b5f37ddf15fa0bcfc84d9da020119
2020-03-06 14:10:44 -05:00
agodavar 6a5d04209c Fix hipExtLaunchMultiKernelMultiDevice compilation issue
Fix compilation error on hip-hcc+clang , hip-vdi+clang
Enabled hipExtLaunchMultiKernelMultiDevice test on hip-vdi path
hipExtLaunchMultiKernelMultiDevice common declaration for all paths

Change-Id: I76031840614fce8e12a8e845548fa43a389a741a
2020-03-04 15:38:14 -05:00
Siu Chi Chan 57edf48191 improve code object loading error message (#1889) 2020-02-28 16:47:40 +05:30
saleelk 3e1f41c165 Fix HIPRTC headers to export C style symbols (#1879) 2020-02-28 16:47:29 +05:30
Rahul Garg 6c5fa32815 Remove deprecated HIP markers (#1876) 2020-02-28 16:47:15 +05:30
Rahul Garg edc97f3073 Add hipDrvOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags] (#1854)
Equivalent to cuOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags].
2020-02-28 16:46:55 +05:30
Alex Voicu d830dad3be Address post-staging issues in #1809 (#1894)
Fixes SWDEV-223910 and SWDEV-223663
2020-02-27 16:21:12 +05:30
Jatin Chaudhary 54447268cc Generating hiprtc lib with hcc+hip-clang
Review comments - generate hiprtc lib everytime when HIP_PLATFORM is hcc

Changes for hip-clang

Removing pre processor directive to simplify

Change-Id: Id38ab368362b58ee0458baeb8051fea709ae6bba
2020-02-24 11:44:17 -05:00
Tao Sang ceb942375d Make __gnu_h2f_ieee and __gnu_f2h_ieee visible
Make __gnu_h2f_ieee and __gnu_f2h_ieee visible so that hipTestHalf
test can succeed in Clang compiler + Hcc RT.

Change-Id: I5f7d5db19e559b3b66356f0170a8dbc1e5505f3e
2020-02-20 14:09:53 -05:00
Christophe Paquot 2e7319e5a6 Merge "Adding a break at right spot to fix a bug in tests which got exposed with clang usage" into amd-master-next 2020-02-19 14:54:15 -05:00
Tao Sang 6772dd1bc1 Fix bug of hip/samples/2_Cookbook/7_streams
Initialize Kernel_descriptor with matched function name.

Change-Id: I26911d6bc9b2beae186a9e6f9441ce408521bce9
2020-02-18 13:53:21 -05:00
Alex Voicu 9b4f39e1d8 Tweak synchronous memcpy implementation (#1809)
The existing one can have issues on certain systems, therefore this limits use of direct memcpy via largeBAR to sizes where it is unequivocally better.

Also addresses SWDEV-220030 and SWDEV-222237.
2020-02-18 20:50:27 +05:30
Jatin Chaudhary 93adb0b434 Adding a break at right spot to fix a bug in tests which got exposed with clang usage
Change-Id: Ibf197f0108eec0bc4b87df8672d24e394a03d1b3
2020-02-18 17:23:45 +05:30
Rahul Garg 8c5e5e435b Fix hipMemcpy3D (#1798)
Fixes #1790 and #1791. hipMemcpy3D still requires further refactoring for different input and output combinations.
2020-02-17 19:35:35 +05:30
Tao Sang 30da92e2af Fix bug of hip/samples/0_Intro/hcc_dialects/vadd_hip
For hipLaunchKernelGGL(), hmod->kernargs is empty, thus we need
insert hmod->kernargs[name_str] which is empty.

Change-Id: I95f818d0525da84452e66c5778f0648a643843c7
2020-02-16 17:58:04 -05:00
Tao Sang 9a005eacf3 Support defaultDriver test with Clang+Hcc Runtime
Fix the following issues:
1.Ignore hidden arguments of kernel functions.
2.Look up both origial function name and function name with .kd postfix
when argments are retrived from module.
3.Addition, fix compiling issue of LaunchKernel test app.

Change-Id: I9400943f2f02433cb4409b19c0cac3626c2bc454
2020-02-15 19:29:13 -05:00
Maneesh Gupta e7120dd876 Use deque instead of vector for code readers so that the iterators and references will be stable (#1851)
* Use deque instead of vector for code readers so that the iterators and references will be stable

* Fix compile error

* Assign the iterator

* Add multithreaded test

* Make threads a multiple of hardware concurrency

* Output on failure

* Add setDevice to try and initialize the context on cuda

* Create context for cuda

* Set context on each thread

* Reduce threads on cuda

* Skip test on cuda

* Try to initialize the primary context on cuda

* Push ctx to the stack as current

* Revert "Push ctx to the stack as current"

This reverts commit bff8cbe950.

* Revert "Try to initialize the primary context on cuda"

This reverts commit fd98514113.

* updated test for nvidia path

* Add c++11 option for nvcc

Co-authored-by: satyanveshd <53337087+satyanveshd@users.noreply.github.com>
2020-02-15 09:51:24 +05:30
Jeff Daily 03bb658721 missing break statement in hipDeviceGetAttribute (#1865)
The break is missing for hipDeviceAttributeMaxTexture3DDepth.
2020-02-13 14:22:56 +05:30
Sarbojit2019 1109cbff83 [hip] Fix for bug introduced in #1770 when blockSize is non-power of 2 (#1864)
Fixes SWDEV-222161
2020-02-13 14:22:46 +05:30
Sarbojit2019 fc5256fd28 ihipEnablePeerAccess return error if peer is not accessible (#1858)
hipDeviceEnablePeerAccess returns success and adds peer into the list even if it is not accessible which creates problem in hipMalloc when it tries to share the ptr to peer device.
Proposed change is to check the access status before updating the peer list and update only when it can access the peer.
2020-02-13 14:22:11 +05:30
ansurya 8c6934223b Reduce GPU copying based on arch it runs on (#1751)
Implements SWDEV-213230.
2020-02-13 14:21:51 +05:30
Aryan Salmanpour 874b201ee2 resolve merge conflict 2020-02-10 10:30:55 -05:00
Maneesh Gupta f8e1c01900 Revert "Match Occupancy APIs syntax with CUDA (#1625)" (#1857)
Reverting this for now till we figure out how to avoid the build
breakage.

This reverts commit fa98798b63.
2020-02-10 10:45:28 +05:30
Paul 85560d38b1 Assign the iterator 2020-02-06 12:15:29 -06:00
Paul f34f96350c Fix compile error 2020-02-06 12:04:50 -06:00
Paul 08123cff0d Use deque instead of vector for code readers so that the iterators and references will be stable 2020-02-06 11:56:17 -06:00
vsytch ef514eef71 Device texture functions should not normalize the sampled pixel (#1826)
* Device texture functions should not normalize the sampled pixel. This is already done by HW.
* Add support to use h/w capability for normalized float data convertion for driver API's

Co-authored-by: ansurya <50609411+ansurya@users.noreply.github.com>
2020-02-05 20:56:17 +05:30
saleelk 499938d974 Implement __hipPushCallConfiguration/__hipPopCallConfiguration for hip_clang (#1845)
This is needed so that the right symbols are present if we want to use hip-clang with hip/hcc runtime
2020-02-04 19:37:57 +05:30
Siu Chi Chan bff8e15e13 Fix C-style hipLaunchKernel (#1835)
* Fix bug in LaunchKernel test
Instead of passing the address of the gpu buffer, pass the address
of the pointer that holds the address of the gpu buffer

* Fix hipLaunchKernel's kernarg buffer construction.
The hipLaunchKernel implementation should rely on ihipModuleLaunchKernel
to construct the kernarg buffer correctly based on kernel metadata.

* Fix a bug in get_functions where the Kernel_descriptor wasn't constructed with the correct kernarg layout information.

* Fix a bug in kernarg layout parsing dealing with kernel without any arg

* teach ihipModuleLaunchKernel to handle kernel without any arg

* Add a more interesting test
2020-02-04 19:37:16 +05:30
Sarbojit2019 13316f724f Added overflow check in kernel launch (#1770) 2020-02-04 09:02:16 +05:30
Aryan Salmanpour 6e867eacb6 [HIP][HIPIFY] Add some missing flags for cooperative launch and occupancy APIs 2020-01-30 15:05:53 -05:00
Evgeny Mankov 2735b9923f Merge pull request #1700 from scchan/object_load_error_check
add error checking for code object loading
2020-01-30 21:31:03 +03:00
satyanveshd fa98798b63 Match Occupancy APIs syntax with CUDA (#1625)
* Match Occupancy APIs syntax with CUDA and fix tests using these APIs
2020-01-29 13:05:53 -08:00
vsytch f72a669487 Add missing texturePitchAlignment member to the hipDeviceProp_t struct. (#1802)
* Add missing texturePitchAlignment member to the hipDeviceProp_t struct.

* Add missing hipDeviceAttributeTexturePitchAlignment enumerator to the hipDeviceAttribute_t enum.

* Initialize texturePitchAlignment to 256. This works for gfx9+, but is technically overaligned in most cases for pre-gfx9.

* Add the texturePitchAlignment property to the NVCC path.
2020-01-27 16:37:00 -08:00
Siu Chi Chan 6613a37b3b Fix associate code object symbols with host allocation bug (#1799)
The current implementation skips this procedure for a given device
object when a global symbol is found in the cache.  This is incorrect:

 - There could be other undefined globals that have not been previously
encountered further down the list
 - If a symbol is found in the cache, it doesn't need to be pinned again
but it still need to be defined for the current executable

Added special case for the printf buffer symbol (already pinned by HCC)

The bug was exposed by running printf on different GPUs.
2020-01-24 16:22:49 +05:30
ansurya df20c17f12 Fix texture tests, always pass row pitch to HSA API for linear layout images (#1785)
=> New ROCr calculates pitch as per HSA specification and addrlib is used to check whether HW can support that configuration. Hence few texture tests are failing with HSA_EXT_STATUS_ERROR_IMAGE_PITCH_UNSUPPORTED.

=> Determine pitch for linear images and always pass rowpitch to HSA API's.
2020-01-16 08:54:30 +05:30
Jatin Chaudhary aadb62f2c9 Remove filesystem dependency in hipRTC (#1749)
Removing dependency on filesystem, so libstdc++fs is no longer required to link
2020-01-10 13:47:54 +05:30
Maneesh Gupta 00bd5d1cec Revert PRs that break ROCm builds (#1781)
Fixes SWDEV-218626 and SWDEV-218629

Changes:
- Revert "`static inline` in a header, just like excess sugar in a diet, causes bloat (#1692)"
   This reverts commit be70b9f7e7.
- Revert "Fix rocFFT build failure (#1777)"
   This reverts commit 753277422a.
2020-01-08 15:11:58 +05:30
Siu Chi Chan f4555c835a Detect when an explicit printf buffer flush is required (#1766)
* Detect when an explicit printf buffer flush is required
in a device/stream synchronization function.

* hip_module.cpp: add missing hc_am.hpp header
2020-01-07 09:06:38 -08:00
satyanveshd 6b5ea15dfe hipMemcpy[To/From]Symbol(Async) fixes (#1774) 2020-01-07 08:11:53 +05:30
Rahul Garg 785a4440c8 Fix nested designator warnings (#1768) 2020-01-06 12:33:34 +05:30
Evgeny Mankov 0dadb23327 Merge pull request #1759 from emankov/master
[HIP] Unify hipError_t (Step 2)
2019-12-30 19:21:09 +03:00
Aryan Salmanpour 6968aeb841 [hip] refactoring cooperative kernel launch APIs (#1737)
This PR is a follow-up on PR# #1698 and it makes two more APIs (hipLaunchCooperativeKernel/hipLaunchCooperativeKernelMultiDevice) inline so that they can work correctly with lazy binding.
2019-12-30 12:42:17 +05:30
ansurya 391e99cd12 Fix texture 3D & 2D layered with N components (#1746)
SWDEV-151670: Issue with 3D texture with 4 components
SWDEV-151671: Issue with 2D layered texture with 4 components

Fixed memcpy when memory is allocated with driver API's.

Github issues: #1755
Fixed 3D default case when array type is not set during memory allocation.
2019-12-30 12:41:42 +05:30
Evgeny Mankov 4921678b6c [HIP] Clean-up deprecated HIP error codes
hipErrorMemoryAllocation -> hipErrorOutOfMemory
hipErrorInitializationError -> hipErrorNotInitialized
hipErrorMapBufferObjectFailed -> hipErrorMapFailed
hipErrorInvalidResourceHandle -> hipErrorInvalidHandle
2019-12-23 17:01:35 +03:00
saleelk 080b0b9a68 Fix the return type of demangle function so that its compatible across ABIs (#1744) 2019-12-23 19:11:40 +05:30
Alex Voicu 75a11330aa Fix late-coming issues. (#1724)
Implementation for hipMemcpyWithStream.
2019-12-23 19:11:24 +05:30
Alex Voicu be70b9f7e7 static inline in a header, just like excess sugar in a diet, causes bloat (#1692) 2019-12-23 19:09:38 +05:30