Commit Graph

191 Commits

Author SHA1 Message Date
Joseph Greathouse e1123ce997 Fix maxSharedMemoryPerMultiProcessor attribute (#1927)
The maxSharedMemoryPerMultiProcessor attribute is meant to describe
the number of bytes of shared memory (LDS space in AMD terminology)
in each SM (CU in AMD terminology). For instance, on AMD GPUs this
is often 64KB per CU, and some Nvidia GPUs it's 96KB per SM.

This shared memory is a different address space from the normal
global memory. However, the current HIP-HCC properties fill this
in with a size that matches the totalGlboalMem property. This gives
a drastically too-high calculation for the amount of LDS space that
each CU has -- tens of GBs vs. 10s of KBs.

This patch fixes this by pulling the maxSharedMemoryPerMultiProcessor
property from the HSA pool that describes how much workgroup-local
space is available on each CU. The HSA runtime eventually pulls
this from the topology information about LDSSizeInKB, defined as
"Size of Local Data Store in Kilobytes per SIMD".

Previously, this HSA query was used to fill in the value of the
sharedMemPerBlock property. On today's AMD GPUs, we know that
the amount of LDS avaialble to the workgroup is identical to the
amount of LDS space in the CU. However, in the future this may
differ. As such, this patch changes around the order and fills
in the "PerMultiProcessor" property from the HSA query (since
what's what the query is defined to return), and then separately
fills in the "PerBlock" property as we know it.

[ROCm/clr commit: 44b16df84f]
2020-03-17 14:00:51 +05:30
Rahul Garg 7395bf9ba9 Remove deprecated HIP markers (#1876)
[ROCm/clr commit: 6be7537cf9]
2020-02-28 16:47:15 +05:30
Rahul Garg 50395502b6 [sample] Add hipDispatchEnqueueRateMT (#1869)
* [sample] Add hipDispatchEnqueueRateMT



[ROCm/clr commit: 893ccc4ddf]
2020-02-13 23:21:40 -08:00
Maneesh Gupta a21b1f84cb 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 2c6e880e05.

[ROCm/clr commit: d032637934]
2020-02-10 10:45:28 +05:30
Rahul Garg b34b02549e [docs] Fix links in cookbook samples (#1824)
[ROCm/clr commit: 27fbfd9d66]
2020-02-04 08:56:31 +05:30
satyanveshd 2c6e880e05 Match Occupancy APIs syntax with CUDA (#1625)
* Match Occupancy APIs syntax with CUDA and fix tests using these APIs


[ROCm/clr commit: 262ad13dd5]
2020-01-29 13:05:53 -08:00
Rahul Garg b78b5fa7d4 Simplify hipDispatchLatency sample (#1793)
* Use hipExtLaunchKernelGGL in dispatchlatency sample

* Let it run on NVCC path too

* Refactoring

* Add test_kernel source

* Remove ResultDB

* Remove error checks


[ROCm/clr commit: 8b8e4a66b4]
2020-01-22 14:37:47 -08:00
Evgeny Mankov d191980c6a [HIP] Clean-up deprecated HIP error codes
hipErrorMemoryAllocation -> hipErrorOutOfMemory
hipErrorInitializationError -> hipErrorNotInitialized
hipErrorMapBufferObjectFailed -> hipErrorMapFailed
hipErrorInvalidResourceHandle -> hipErrorInvalidHandle


[ROCm/clr commit: 4aaa2336a8]
2019-12-23 17:01:35 +03:00
Rahul Garg cf648f7dbe 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


[ROCm/clr commit: dfee3ae279]
2019-11-07 13:17:10 +05:30
Rahul Garg 04785f2d54 Merge pull request #1515 from ansurya/tex_unbind_issue_fix
Fix undefined ref to hipUnbindTexture for texture types

[ROCm/clr commit: aeb7cebbad]
2019-10-30 17:54:15 -07:00
Rahul Garg 72c686ed67 Revert "Fix occupany APIs (#1560)"
This reverts commit ad1e409a24.


[ROCm/clr commit: 27221bc823]
2019-10-29 11:41:08 -07:00
Anusha Godavarthy Surya 0140ea8e1a merge from master
[ROCm/clr commit: ae838f8cee]
2019-10-25 15:52:09 +05:30
Rahul Garg 7f429afe2e Add HIP checks in texture driver sample (#1581)
[ROCm/clr commit: 170c4f0270]
2019-10-24 17:45:51 +05:30
satyanveshd ad1e409a24 Fix occupany APIs (#1560)
Addresses SWDEV-205006 

[ROCm/clr commit: 6c5fbf9b4a]
2019-10-24 17:44:47 +05:30
kjayapra-amd 97c823d552 Use the correct return type in runTest in 11_texture_driver sample. (#1546)
Fixes SWDEV-203394.
Currently in runTest() returns true, even if the texture reference copy does not happen. Using the existing testResult Flag to return from runTest().

[ROCm/clr commit: 9d571e3c9e]
2019-10-16 10:52:15 +05:30
Anusha Godavarthy Surya 712b6ccdc2 Added unbind texture to samples and tests
[ROCm/clr commit: 20cfe17805]
2019-10-15 11:34:15 +05:30
Yaxun (Sam) Liu e5a61a51de Fix sample 11_texture_driver for hip-clang (#1370)
[ROCm/clr commit: 793b18c0b1]
2019-08-29 01:03:20 +00:00
satyanveshd 0e4701d59f [sample] add new cookbook sample - occupancy (#1352)
* occupancy.cpp with Makefile

* occupancy sample changes according tothe comments

* Changes according to the review comments

* Occupancy Sample Changes

* Changes according to review comments


[ROCm/clr commit: d2df21e58c]
2019-08-29 01:01:49 +00:00
Sarbojit2019 0cf9a5b532 Added missing device prop fields into hipInfo sample (#1357)
* Added prop.integrated into hipInfo sample

* Added missing deviceProp fileds in hipInfo


[ROCm/clr commit: 919bb6c74d]
2019-08-23 09:21:47 +00:00
chrispaquot 4b13efac04 Set device before processing each one (#1358)
[ROCm/clr commit: d0b11deb7f]
2019-08-23 09:19:50 +00:00
Rahul Garg b7447d21c3 Remove -g from hipBusBandwidth makefile (#1351)
[ROCm/clr commit: 900590967d]
2019-08-21 10:01:31 +00:00
Rahul Garg 6641c0dc94 Add support for hipFuncGetAttribute (#1279)
* Add support for hipFunGetAttribute

* Support NVCC path

* Test using sample module_api_global

* Try fixing CI build failure due to hip_prof_gen scan

* Fix for CI build issue

* Resolve conflict

* Rebase and resolve conflicts with master

* Fix build error

* Fix NVCC path build error


[ROCm/clr commit: 8b6317d041]
2019-08-08 08:27:41 +00:00
ansurya aa8224417e HIPCommander code cleanup (#1207)
* HIPCommander code cleanup

* Removed non-used headerfiles

* Removed empty ifdef


[ROCm/clr commit: 12bf6dbcda]
2019-07-18 03:18:15 +00:00
Evgeny Mankov b5f0cdaa7b [HIP][HIPIFY] Split HIP_ARRAY_DESCRIPTOR struct to HIP_ARRAY_DESCRIPTOR and HIP_ARRAY3D_DESCRIPTOR
[Reason] To be compatible with CUDA [#1133]

Update HIP code, hipify-clang, tests and docs

[TODO] Add support of the corresponding functions on nvcc fallback path


[ROCm/clr commit: f0832fd968]
2019-07-11 14:58:16 +03:00
Aryan Salmanpour 7a4e3ecc00 [hip][samples] fix a typo in module_api/defaultDriver sample (#1210)
[ROCm/clr commit: b1d8736f4a]
2019-07-10 03:05:19 +00:00
Maneesh Gupta f977bf9278 Fix sample module_api_global for hip-clang (#1201)
module_api_global relies on a HCC only feature which allows host code
to write to device variables. This feature does not exist in CUDA
or hip-clang, which causes the sample not working in CUDA or hip-clang.

This patch fixes the sample by using standard features of CUDA and
hip-clang. The fixed sample works in HCC, CUDA and hip-clang.

[ROCm/clr commit: 3541d18528]
2019-07-03 08:52:19 +00:00
Jatin Chaudhary db5f404b5c Adding new unroll example (#1187)
[ROCm/clr commit: 3cb87cdc46]
2019-07-03 08:51:19 +00:00
Yaxun Sam Liu 79c6028768 Fix sample module_api_global for hip-clang
module_api_global relies on a HCC only feature which allows host code
to write to device variables. This feature does not exist in CUDA
or hip-clang, which causes the sample not working in CUDA or hip-clang.

This patch fixes the sample by using standard features of CUDA and
hip-clang. The fixed sample works in HCC, CUDA and hip-clang.


[ROCm/clr commit: 98648828c0]
2019-07-02 16:36:53 -04:00
Maneesh Gupta 9ce31b041b Merge pull request #1164 from gargrahul/cleanup_module_api_samples
Add cleanup code in module api samples

[ROCm/clr commit: 439b6e41d4]
2019-06-20 05:57:46 +05:30
Rahul Garg ebd29537d0 Add cleanup code in module api samples
[ROCm/clr commit: 49ac54abde]
2019-06-07 05:23:11 +05:30
Rahul Garg 14f409548a Fix sample to use kernelargs for launch
[ROCm/clr commit: 4e6ad95403]
2019-06-07 05:17:15 +05:30
Evgeny Mankov 204043c6e0 [HIP][HIPIFY] Make hipMemcpyParam2D coherent with cuMemcpy2D
+ Makes hip_Memcpy2D struct compatible with CUDA_MEMCPY2D struct
+ Add hipMemcpyParam2D support in nvcc fallback path
+ Update hipify-clang, tests and docs accordingly


[ROCm/clr commit: 9cb3e9aa5e]
2019-05-22 18:31:39 +03:00
Evgeny Mankov fef3e849eb [HIP][tests] Copyright notice update
[ROCm/clr commit: 7664560f14]
2019-05-20 18:46:23 +03:00
Nick Curtis 3b6b356d23 Markdown fixes & Whitespace cleanup for samples (#1096)
* Fix multiline code blocks in README's

* Whitespace cleanup


[ROCm/clr commit: fb92feae0e]
2019-05-12 19:27:44 +05:30
Rahul Garg 19d2ff51c8 Test hipModuleGetGlobal
[ROCm/clr commit: 46346343af]
2019-03-15 04:08:03 +05:30
Rahul Garg f364b32e29 Add extension for kernel concurrency on same stream
[ROCm/clr commit: 263e82a67a]
2019-03-06 12:55:39 +05:30
Maneesh Gupta b2a859754d Merge pull request #938 from gargrahul/fix_hipBusBW_p2p_bidir
Fix hipBusBW sample for P2P bidirectional test

[ROCm/clr commit: 4eff6bd09a]
2019-02-28 07:14:38 +05:30
Rahul Garg 1985d70605 Fix hipBusBW sample for P2P bidirectional test
[ROCm/clr commit: 828e62fe4f]
2019-02-28 00:56:07 +05:30
Rahul Garg a835072903 Fix hipBusBW overflow with setting beats/iterations
[ROCm/clr commit: 4fef69afdc]
2019-02-27 00:18:52 +05:30
Rahul Garg 0d6b2e90cd Fix error codes in P2P sample test
[ROCm/clr commit: 3e2f946d3f]
2019-02-05 06:30:57 +05:30
Rahul Garg 84c31c3623 Fixed HIP error check in P2P sample test
[ROCm/clr commit: 7951cd03b2]
2019-01-23 01:10:07 +05:30
Yaxun Sam Liu e85fa43e53 Fix sample bit_extract for hip-clang
[ROCm/clr commit: de907674d6]
2018-11-12 16:50:47 -05:00
Alex Voicu fe7e09d222 Guard new includes.
[ROCm/clr commit: 59533b84e1]
2018-10-18 12:29:27 +01:00
Alex Voicu c505c2be38 Re-sync with upstream.
[ROCm/clr commit: 602280eb8b]
2018-10-18 12:27:03 +01:00
Maneesh Gupta 50e89b0a30 Replace hipLaunchKernel -> hipLaunchKernelGGL
Change-Id: I4d99009e1199811d417becf1e1b934ec4d4e30be


[ROCm/clr commit: e1fe095471]
2018-10-17 14:32:25 +05:30
Alex Voicu 2577b11365 Update samples.
[ROCm/clr commit: f480a134f4]
2018-10-13 23:28:22 +01:00
Rahul Garg f395a627a0 Remove adipose extn from launchKernelHcc sample
[ROCm/clr commit: 632b6f6b39]
2018-09-12 16:41:24 +05:30
Rahul Garg 1f0d24fa61 Clean up module api samples
[ROCm/clr commit: b6c5d7d71b]
2018-08-08 22:28:13 +05:30
Rahul Garg bc0129d05a Fix hipCommander Makefile
[ROCm/clr commit: 9707e9f563]
2018-05-16 15:01:32 +05:30
Rahul Garg ec51e3c539 Removed hidden args and hipLaunchParm from HIP/HCC path
[ROCm/clr commit: 2184e7f6da]
2018-03-16 22:50:25 +05:30