Γράφημα Υποβολών

1180 Υποβολές

Συγγραφέας SHA1 Μήνυμα Ημερομηνία
Vladislav Sytchenko 3d7945faae Rework device texture headers
This change addresses three things.

First the available APIs are brought up to par with Cuda (missing ones are added and incorrect ones removed).

Second the size of hip/hcc_detail/texture_functions.h. Using some template magic we can bring down the code size down from ~11k lines to only ~900 lines in total.

Third this change fixes some bugs in the declaration of the texture fetch funcitons. Currently the return type for textures with read mode set to hipReadModeNormalizedFloat is not float. This causes pixel data to be lost during the bitcast when the texture pixel element size is less than the size of float.

The new headers will only be enabled for VDI to avoid breaking HCC.

Change-Id: I77cb29293fb79e55681be094c37702a48d80b64c
2020-03-17 17:04:37 -04:00
Sameer Sahasrabuddhe d48738856c SWDEV-204784: separate printf declaration for vdi/clang
There are now two implementations of printf in HIP:

1. The implemenation for HCC is controlled by the HC_FEATURE_PRINTF
   macro, and it works only with the HCC compiler used in combination
   with the HCC runtime.

2. The implementation for hip-clang requires the VDI runtime, and is
   always enabled with that combination.

Change-Id: Ibaeda7900ffe2ce602ca0094aafed0f1147ac2b6
2020-03-16 04:00:39 -04:00
Vladislav Sytchenko caea3f9b32 Fix typo in device __shfl_xor function
Change-Id: I8bcdd53ced00c596a0af013a0c34e37aa67c93ae
2020-03-10 13:23:08 -04:00
Vladislav Sytchenko cd76eb7486 Add hipDrvMemcpy3D.
This is the equivalent of cuMemcpy3D.

Change-Id: Ib2e06dbd6f5093c931cdfd36c87617f32acffc2d
2020-03-09 16:11:25 -04:00
Lad, Aditya e7fdb3d796 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 5a6c605730 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
saleelk 40a28e767e Fix HIPRTC headers to export C style symbols (#1879) 2020-02-28 16:47:29 +05:30
Rahul Garg 6be7537cf9 Remove deprecated HIP markers (#1876) 2020-02-28 16:47:15 +05:30
Rahul Garg 1c794045e0 Add hipDrvOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags] (#1854)
Equivalent to cuOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags].
2020-02-28 16:46:55 +05:30
Nick Curtis a094c87038 fix long shuffle implementations for windows (#1895)
Fixes for SWDEV-223694
2020-02-26 15:53:56 +05:30
Rahul Garg ec84c16d75 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 15b91e9f1e Temporarily comment out Hcc-specific APIs for CLang compiler
Temporarily comment out Hcc-specific template functions
hipExtLaunchKernelGGL and hipOccupancyMaxPotentialBlockSize for CLang
compiler so that all test cases under hip/samples can be built
successfully for Clang + Hip/Hcc runtime.

Change-Id: Iafc761257be4a7b34eafa6759a01f369570cd6ce
2020-02-16 22:26:47 -05:00
Nick Curtis 5b0f34c59b Implement long / long long shuffles (#1829)
Implement additional data-types for shuffles (long and long long).
Based upon the double implementation.
2020-02-15 09:51:09 +05:30
ansurya 888a7f2a90 Reduce GPU copying based on arch it runs on (#1751)
Implements SWDEV-213230.
2020-02-13 14:21:51 +05:30
Aryan Salmanpour 1c013bab3e fix build error in nvcc path 2020-02-11 12:16:51 -05:00
Aryan Salmanpour 504412c1e4 Fix a typo causing a build error 2020-02-10 11:44:40 -05:00
Aryan Salmanpour dfa565d76f resolve merge conflict 2020-02-10 10:30:55 -05:00
Maneesh Gupta d032637934 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 262ad13dd5.
2020-02-10 10:45:28 +05:30
Alex Voicu 8f96152d3a (Maybe) Match alignment between Clang and GCC. (#1789)
Should fix #1740 and the related internal bug.
2020-02-10 10:44:49 +05:30
vsytch fa363ae721 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
Aryan Salmanpour 75572a4175 code clean up 2020-01-31 13:08:25 -05:00
Aryan Salmanpour 6db9b782be [HIP][HIPIFY] Add some missing flags for cooperative launch and occupancy APIs 2020-01-30 15:05:53 -05:00
satyanveshd 262ad13dd5 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 6da0c82b78 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
vsytch e419a1609f Update the HIP_TRSF_* flags to match their Cuda equivalents. (#1801) 2020-01-24 11:41:15 -08:00
mshivama 0605426049 SWDEV-220503: this_grid().thread_rank() gives incorrect result (#1808)
* fix a minor bug while computing this.grid()::thread_rank()
2020-01-24 16:23:28 +05:30
kpyzhov 1d6a2fb064 Don't use accelerated vector element access for hip-clang. (#1796) 2020-01-15 18:17:08 -08:00
kpyzhov 0918614615 Add missing constructors for Scalar_accessor class. (#1792) 2020-01-14 11:30:21 -08:00
Evgeny Mankov 9c2fcff9ce [HIP] Unify hipError_t (Step 3): Sync nvcc path (#1778)
* [HIP] Unify hipError_t (Step 3): Sync nvcc path

* [HIP][fix] Add CUDA 10.x support to nvcc path
2020-01-10 13:47:18 +05:30
Maneesh Gupta c091635f5a 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 cf526f5484.
- Revert "Fix rocFFT build failure (#1777)"
   This reverts commit cbd8f604ec.
2020-01-08 15:11:58 +05:30
ansurya cbd8f604ec Fix rocFFT build failure (#1777)
Fixes SWDEV-217761
2020-01-07 08:12:37 +05:30
Rahul Garg 534376cb41 Add hipBindTexture2D on NVCC path (#1773) 2020-01-06 12:33:50 +05:30
Rahul Garg 3fe1695c3a Fix hipcc warning related to hipVersion (#1767)
* Fix hipcc warning related to hipVersion
* Rename hipVersion.h to hip_version.h
* Remove HIP_VERSION splitting
* Update .gitignore
- Ignore generated include/hip/hip_version.h
- Removed some stale entries
- Added executables from samples/1_Utils/*/ for consistency with bin/ entries.
2020-01-06 12:33:23 +05:30
Evgeny Mankov ed43699a3a Merge pull request #1759 from emankov/master
[HIP] Unify hipError_t (Step 2)
2019-12-30 19:21:09 +03:00
Sarbojit2019 4fd77f8336 Change to generate hipVersion.h (#1726)
HIP_VERSION_MAJOR, HIP_VERSION_MINOR, HIP_VERSION_PATCH and HIP_VERSION pre-processor macros are now defined in hipVersion.h instead of being set by hipcc.
2019-12-30 12:44:24 +05:30
Aryan Salmanpour 857052be1e [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
Evgeny Mankov 4aaa2336a8 [HIP] Clean-up deprecated HIP error codes
hipErrorMemoryAllocation -> hipErrorOutOfMemory
hipErrorInitializationError -> hipErrorNotInitialized
hipErrorMapBufferObjectFailed -> hipErrorMapFailed
hipErrorInvalidResourceHandle -> hipErrorInvalidHandle
2019-12-23 17:01:35 +03:00
Yaxun (Sam) Liu 35988729f3 Add macro __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ (#1761)
This is to allow force enable cuda wrapper for OpenMP for flexibility
2019-12-23 19:24:54 +05:30
saleelk 1ca75e5f6d Fix the return type of demangle function so that its compatible across ABIs (#1744) 2019-12-23 19:11:40 +05:30
Alex Voicu 150e690a3a Fix late-coming issues. (#1724)
Implementation for hipMemcpyWithStream.
2019-12-23 19:11:24 +05:30
Maneesh Gupta 32625638da replace array designator C99 (#1694)
* replace array designator C99

* Update texture_functions.h

Highlight valid and invalid values in texFormatToSize

Co-authored-by: Maneesh Gupta <maneesh.gupta@amd.com>
2019-12-23 19:10:24 +05:30
Alex Voicu cf526f5484 static inline in a header, just like excess sugar in a diet, causes bloat (#1692) 2019-12-23 19:09:38 +05:30
Evgeny Mankov 4d29423705 [HIP] Fix typo 2019-12-23 12:06:44 +03:00
Evgeny Mankov 9ae76609a1 [HIP] Unify hipError_t (Step 2)
Step 2. Make a few hipError codes deprecated
Update hipify-clang, hipify-perl, docs and samples accordingly
2019-12-22 02:05:31 +03:00
Maneesh Gupta 6c7ce07577 Update texture_functions.h
Highlight valid and invalid values in texFormatToSize
2019-12-21 12:25:36 +05:30
Sarbojit2019 911d406bf1 Fix for windows dtest build failure (#1742) 2019-12-19 13:10:43 -08:00
mhbliao a0a50ac601 [hip] Add macro guarding the enum conversion for scalar accessor. (#1748)
- That's a high overhead part, which needs enabling ONLY if necessary.
2019-12-19 10:08:37 -08:00
Evgeny Mankov 21b0f64f3a [HIP] Unify hipError_t (Step 1)
Step 1. Set the same values for RT error codes as for analogous Driver's

[Reason] RT's and Driver's error codes unification in CUDA 10.2
2019-12-13 19:40:16 +03:00
mhbliao 539370d308 Only add hipExtLaunchMultiKernelMultiDevice for non-HCC compilers. (#1729) 2019-12-10 10:32:25 -08:00
jglaser 280a8ebadf fix linking of vector types with gcc (#1690)
* fix linking of vector types when linking hipcc objects with gcc

* use __atribute__((vector_size)) with both clang and gcc

and reinstate nonaligned n=3 vector type

* use implicit conversion to value and ext_vector_type when available

* Alternate formulation for GCC compatibility

* Built-in arrays don't mix well with placement new

* Fix typo

* Add conversions to enum

* Fix Scalar_accessor assignment.

* Update hip_vector_types.h

* stir up the underlying_type hideous mess

This fixes the HIP build issue "error: only enumeration types have underlying types".
2019-12-10 09:40:15 +05:30