Commit Graph

788 Commits

Author SHA1 Message Date
Jatin Chaudhary ee8cee7d35 [dtests] __shfl_up and __shfl_down tests (#1899)
[ROCm/clr commit: dacc90f415]
2020-02-28 16:48:15 +05:30
saleelk 21712e6fb8 Fix HIPRTC headers to export C style symbols (#1879)
[ROCm/clr commit: 40a28e767e]
2020-02-28 16:47:29 +05:30
jiabaxie 43818d733a Cleaned up error messages for HipEnvVarDriver test (#1825)
There were several error messages that appeared even if the hipEnvVarDriver.exe test passes and executes successfully. Now it is cleaned up. The following are those instances:

* When popen searches for directed_test directory but does not find it, it outputs an error, then finds the hipEnvVar at the same level. Currently the fix will prompt the test to only output an error if both searches for hipEnvVar fails.
* When assertion is used towards the later half of the test, conditions were set to specifically hide the devices, resulting in No Hip Device detected in the latter half of the test. The fix will make these errors not appear as they are intended to not find any devices. Assertions themselves are untouched.

HipEnvVarDriver.cpp has also been refactored. Reading HipEnvVar will now happen in a helper function for getDeviceNumber and getDevicePCIBusNumRemote, as the code to read HipEnvVar were really similar in them.


[ROCm/clr commit: e747efe2b4]
2020-02-28 16:46:12 +05:30
Rahul Garg 6f1d14c96d Fix hipMemcpy3D (#1798)
Fixes #1790 and #1791. hipMemcpy3D still requires further refactoring for different input and output combinations.

[ROCm/clr commit: ec84c16d75]
2020-02-17 19:35:35 +05:30
Maneesh Gupta 734b90c592 [dtests] Fix random timeout failures in hipModuleLoadDataMultThreaded (#1877)
Limit the max threads that are launched to 16.

[ROCm/clr commit: 2ec55fde47]
2020-02-17 11:16:20 +05:30
vsytch fd7dfa19d1 Add missing __hip_pinned_shadow__ attributes to the texture global vars. (#1866)
[ROCm/clr commit: 5afe43b1aa]
2020-02-15 09:52:25 +05:30
Maneesh Gupta 2b1a99ff12 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 c1b707ff63.

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

This reverts commit d9cbd5a143.

* updated test for nvidia path

* Add c++11 option for nvcc

Co-authored-by: satyanveshd <53337087+satyanveshd@users.noreply.github.com>


[ROCm/clr commit: e085417370]
2020-02-15 09:51:24 +05:30
Nick Curtis e9ee5a3719 Implement long / long long shuffles (#1829)
Implement additional data-types for shuffles (long and long long).
Based upon the double implementation.


[ROCm/clr commit: 5b0f34c59b]
2020-02-15 09:51:09 +05:30
Satyanvesh Dittakavi 373da28853 Add c++11 option for nvcc
[ROCm/clr commit: 2034ed3561]
2020-02-13 19:48:26 +05:30
Satyanvesh Dittakavi 360f321e76 updated test for nvidia path
[ROCm/clr commit: 627d9a1f46]
2020-02-13 16:34:05 +05:30
Paul 069f2672b9 Revert "Try to initialize the primary context on cuda"
This reverts commit d9cbd5a143.


[ROCm/clr commit: dd6676dadf]
2020-02-11 12:34:11 -06:00
Paul 509d8096a5 Revert "Push ctx to the stack as current"
This reverts commit c1b707ff63.


[ROCm/clr commit: cd279cd574]
2020-02-11 12:34:10 -06:00
Paul c1b707ff63 Push ctx to the stack as current
[ROCm/clr commit: e8a7cc6957]
2020-02-11 11:46:29 -06:00
Paul d9cbd5a143 Try to initialize the primary context on cuda
[ROCm/clr commit: 86cdb30195]
2020-02-11 11:26:24 -06:00
Paul 5e16db1f16 Skip test on cuda
[ROCm/clr commit: accdd882dc]
2020-02-10 17:23:58 -06:00
Paul e6663a7c23 Reduce threads on cuda
[ROCm/clr commit: 5d24a2beef]
2020-02-10 16:37:34 -06:00
Paul 44c4b72f83 Set context on each thread
[ROCm/clr commit: 7a6e88480b]
2020-02-10 16:01:53 -06:00
Paul 8fb4e25cf1 Create context for cuda
[ROCm/clr commit: bb145e77ae]
2020-02-10 15:52:34 -06:00
Paul 218994969f Add setDevice to try and initialize the context on cuda
[ROCm/clr commit: 9494d0e3c9]
2020-02-10 13:37:45 -06: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
Paul daaa1ebb80 Make threads a multiple of hardware concurrency
[ROCm/clr commit: fb8c7cb3ec]
2020-02-06 16:23:29 -06:00
Paul b29fe7e893 Add multithreaded test
[ROCm/clr commit: bf69c7ae32]
2020-02-06 16:21:40 -06:00
vsytch e2b6794a07 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>


[ROCm/clr commit: fa363ae721]
2020-02-05 20:56:17 +05:30
lthakur a5409a5556 [dtest] Update hipLaunchCoopMultiKernel.cpp (#1844)
used reinterpret_cast<uint32_t*> for numBlocks, as expected by hipOccupancyMaxActiveBlocksPerMultiprocessor() api.

[ROCm/clr commit: 2ef4dead24]
2020-02-04 19:37:38 +05:30
Siu Chi Chan 30f09a1435 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

[ROCm/clr commit: 14e235378f]
2020-02-04 19:37:16 +05:30
gandryey f33fa4ab31 [dtest] RCCL multi device launch test (#1731)
Simple test for hipLaunchCooperativeKernelMultiDevice API.


[ROCm/clr commit: 3c718ebe15]
2020-02-04 08:53:43 +05:30
jujiang-del a6012c4bfb [dtest] Avoid resViewDesc for non-array resource in texture creation (#1823)
[ROCm/clr commit: cb632005bc]
2020-01-30 14:04:41 -08:00
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
Siu Chi Chan adb93af8c3 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.

[ROCm/clr commit: 8fc7cad90f]
2020-01-24 16:22:49 +05:30
Yaxun (Sam) Liu 87887f6152 Fix test hip_bitextract.cpp (#1784)
The randomly generated offset+width may exceeds 32, which causes
a left shift operation with 32-offset-width. As an unsigned number
that is greater than 32 and causes undefined behavior. When the
test is compiled without -mavx it is still OK. However when
the test is compiled with -mavx, the undefined behavior causes
wrong results and test failure.

This patch adjusts width so that offset+width<=32 always.

[ROCm/clr commit: 55525fa466]
2020-01-10 13:46:57 +05:30
Rahul Garg 1e78733f53 Add hipBindTexture2D on NVCC path (#1773)
[ROCm/clr commit: 534376cb41]
2020-01-06 12:33:50 +05:30
Evgeny Mankov 8c58286a9b Merge pull request #1759 from emankov/master
[HIP] Unify hipError_t (Step 2)

[ROCm/clr commit: ed43699a3a]
2019-12-30 19:21:09 +03:00
Sarbojit2019 4d2ee146e1 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.

[ROCm/clr commit: 4fd77f8336]
2019-12-30 12:44:24 +05:30
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
Alex Voicu 1f762e3970 Fix late-coming issues. (#1724)
Implementation for hipMemcpyWithStream.


[ROCm/clr commit: 150e690a3a]
2019-12-23 19:11:24 +05:30
Vladislav Sytchenko dc12f8017e Add comments explaining choice on the cap for system memory on Windows.
[ROCm/clr commit: a91bafca40]
2019-12-13 21:38:27 -05:00
Vladislav Sytchenko 014f068e2f Add explicit cast when computing the available amount of system memory.
[ROCm/clr commit: 4c21eed68b]
2019-12-13 21:37:30 -05:00
Vladislav Sytchenko d2be30f0e0 Reduce the amount of free host memory to 40% of what is reported on Windows, otherwise we can run into OOM situations.
[ROCm/clr commit: 282367ed6d]
2019-12-11 20:21:12 -05:00
Rahul Garg 48faf7423a 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.

[ROCm/clr commit: a369bd4418]
2019-12-06 09:51:53 +05:30
Rahul Garg 6c7a338471 Fix hipMemcpyWithStream (#1707)
* Fix hipMemcpyWithStream
* Add a dtest for the same.


[ROCm/clr commit: 261a04580f]
2019-12-04 11:56:23 +05:30
Maneesh Gupta 97850ae9a8 Revert changes for atomic FADD support when address is in LDS (#1701)
This reverts PR #1591 and follow-on PR #1695

[ROCm/clr commit: 4c92bd50c4]
2019-11-29 11:58:12 +05:30
Alex Voicu e1dca187c9 Use native support for atomic FADD when address is in LDS (#1591)
[ROCm/clr commit: 2ed3a0873c]
2019-11-22 07:53:48 +05:30
Paul Fultz II 29bb65f6e0 Fix helper header when using c++17 (#1666)
This will fix issue #1621. It also adds tests for is_callable with c++11, c++14, and c++17.

The fallback implementation was completely broken so I rewrote it so it pass the tests as well. This should be used instead of PR #1631.

[ROCm/clr commit: 57b1b03261]
2019-11-20 21:33:42 +05:30
Alex Voicu 5c27a4f570 Extend vector type capabilities and add tests to reflect it. (#1656)
[ROCm/clr commit: c383f20691]
2019-11-20 21:32:32 +05:30
Sarbojit2019 2c00d66995 Revert [HIP] Fixed hipStreamAddCallback (#1674)
This reverts commit 4d0b7e65bb.
Addresses SWDEV#212675.

[ROCm/clr commit: 8a3c36a424]
2019-11-20 11:55:46 +05:30
Rahul Garg 6813f0436c [dtest] Rename hipExtLaunchMultiKernelMultiDevice dtest (#1671)
[ROCm/clr commit: fa1335f419]
2019-11-19 09:41:13 -08:00
Sameer Sahasrabuddhe 82aa679a6d hostcall: add tests that are only used by the VDI build (#1664)
[ROCm/clr commit: e158b0b255]
2019-11-18 19:52:40 -08:00
Rahul Garg f524f75b69 Fix gcc build on NVCC path (#1661)
* Fix gcc build on NVCC path

* Fix CI build errors

* [dtest] Fix texture and surface obj2D tests


[ROCm/clr commit: ff31f734fe]
2019-11-18 12:19:22 +05:30
jiabaxie de260a6d60 Updated hipEnvVarDriver to work with Windows (#1614)
* Updated hipEnvVarDriver to work with Windows

* Cleaned up a bit of code

* Fixed a part where putenv was used for both win and linux

* Defines moved to test_common.h and cleaned up code

* Cleaned up some macro defines and used const char instead

* Got rid of some excess commenting

* directory paths are unconditional

* Cleaned some duplicate code, and variables are now declared and defined together


[ROCm/clr commit: 7bbd420068]
2019-11-18 12:18:29 +05:30
kjayapra-amd fffdd3da8d [dtests] Fixing compilation error in saxpy.cpp (#1608)
[ROCm/clr commit: 99da905509]
2019-11-18 12:18:11 +05:30