İşleme Grafiği

1065 İşleme

Yazar SHA1 Mesaj Tarih
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
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
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 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
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
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
Rahul Garg e53fc316f1 Revert - Changes related to hipMemcpyWithStream (#1718)
Reverting #1673, #1697 and #1707.
Support for hipMemcpyWithStream and memcpy optimizations, will be brought in again once issues seen with these are resolved independently.
2019-12-06 09:51:53 +05:30
Rahul Garg 892d2a562e Fix hipMemcpyWithStream (#1707)
* Fix hipMemcpyWithStream
* Add a dtest for the same.
2019-12-04 11:56:23 +05:30
Aryan Salmanpour 68cc787781 [hip] refactoring hipExtLaunchMultiKernelMultiDevice API (#1698)
[Background] it was found that if lazy linking used for a library that calls hipExtLaunchMultiKernelMultiDevice API then this API can get the wrong program_state object for looking up device kernels leading to a "No device code available" error in this API.

To fix this issue, the API was refactored to be inline and get and pass the correct program_state to an internal hip API to request a multi-device kernel launch.
2019-12-04 11:50:51 +05:30
Siu Chi Chan 6ecd303d94 add error checking for code object loading 2019-11-28 14:00:48 -05:00
Jeff Daily 299bbe2325 fix hipMempcy precondition, test for zero size first (#1697) 2019-11-25 19:03:03 -08:00
satyanveshd 6b06911ef1 fixed directed tests fail when hcc bumped to 3.0 (#1678)
Handled the HCC version check appropriately as few of the directed tests (SWDEV-212161) were failing when hcc was bumped to 3.0.
2019-11-20 21:37:52 +05:30
Alex Voicu 5a1f823739 General sync memcpy improvements. Add hipMemcpyWithStream (#1673)
* General sync memcpy improvements. Add `hipMemcpyWithStream`

* Update hip_memory.cpp
2019-11-20 21:36:37 +05:30
Rahul Garg b3161e9fa0 Update error codes for hipGetDevice for doxygen and move up null check (#1668)
* [docs] Update error codes for hipGetDevice

* Move up out ptr check
2019-11-20 21:35:27 +05:30
Sarbojit2019 153a959280 Revert [HIP] Fixed hipStreamAddCallback (#1674)
This reverts commit 45613311d7.
Addresses SWDEV#212675.
2019-11-20 11:55:46 +05:30
Jeff Daily 3a7eb694f5 hipStreamSynchronize can skip marker if stream is empty (#1667) 2019-11-19 09:42:43 -08:00
Sarbojit2019 b865a50e44 Added null check in hipEventSynchronize (#1627)
* Added missing null check in hipEventSynchronize
* Minor correction in the Event API description
2019-11-18 12:18:55 +05:30
Jeff Daily e31e0ca12e General hipMemset improvements (#1495)
* hipMemset et al can use HSA API directly for synchronous cases

* lock and flush stream in hipMemset, hold lock until complete

* move hipMemset async check to front of conditional

* use hsa_amd_memory_fill for additional sync memset cases

code cleanup/review for all memset calls

* Fix inversion of execution mutating value.

* ihipMemsetSync fall back to kernel if HSA memset fails

* Never fallback, never surrender.

* Allow NULL stream.

* Optimise memset kernel. Remove deadwood.

* Update hip_memory.cpp

* Clean up stream logic in sync memset

* Revert "Clean up stream logic in sync memset"

This reverts commit 6117dedf673367f44cc704192573a117a3d92477.
2019-11-07 13:19:54 +05:30
Sarbojit2019 45613311d7 [HIP] Fixed hipStreamAddCallback [SWDEV#165185] (#1425)
Fixed hipStreamAddCallback() as requested in SWDEV#165185
Added unit test to test the behavior
2019-11-07 13:18:12 +05:30
ansurya e07926ce0f Fixed texture 2D mapping for pitched arrays & 3D Texture read (#1415)
Texture 2D image mapping for pitched arrays:
github issue: Texture Object's Buffer seems to be Misaligned #886
JIRA ticket: SWDEV-199313

SWDEV-151670 : Fixed issue with 3D texture with 4 components
SWDEV-151671 : Issue with 2D layered texture with 4 components
2019-11-07 13:17:46 +05:30
Rahul Garg 579a4f36fa Rename hip/hip_hcc.h to hip/hip_ext.h (#1341)
* Rename hip/hip_hcc.h to hip/hip_ext.h

* Deprecate hip_hcc.h
2019-11-07 13:17:10 +05:30
Jeff Daily 85080905c0 hipEventRecord only needs one lock; remove locked_eventIsReady 2019-11-06 15:56:32 +00:00
Jeff Daily 7986090d9c remove ihipEvent_t::refreshEventStatus(), new hipEventElapsedTime
This fixes possible races in hipEventElapsedTime.
2019-11-06 15:46:46 +00:00
Jeff Daily 6fcff0118e fix race condition in hipEventRecord 2019-11-04 17:45:11 +00:00
Rahul Garg 782cf1c007 Merge pull request #1598 from lmoriche/master
Fix a code object memory corruption
2019-10-31 17:12:24 -07:00
Rahul Garg 85d70086cb Add stream 2019-10-31 12:15:56 -04:00
Rahul Garg efe6fa86dc Fix HIP init calls in hipMemcpy2DFromArray 2019-10-31 12:15:56 -04:00