Sarbojit2019
fa1e44aa0e
[HIP] Fixed hipStreamAddCallback [SWDEV#165185] ( #1425 )
...
Fixed hipStreamAddCallback() as requested in SWDEV#165185
Added unit test to test the behavior
[ROCm/hip commit: 45613311d7 ]
2019-11-07 13:18:12 +05:30
Maneesh Gupta
7f41814190
[dtests] Fix typo in hipAPIStreamDisable.cpp ( #1227 )
...
Change-Id: Ib88a6be49ba192578129bb88ad09817839981398
[ROCm/hip commit: 8a28afeb84 ]
2019-07-17 07:28:38 +00:00
Konstantin Pyzhov
993f323887
Disable hipStreamSync2 test for hip-clang.
...
[ROCm/hip commit: 7cbaa5082b ]
2019-05-20 02:13:30 -04:00
Maneesh Gupta
fa07d40cdd
[hit] Rename RUN -> TEST & RUN_NAMED -> TEST_NAMED
...
Change-Id: I75e24f15129973cee15fc9dac65d678bd2172074
[ROCm/hip commit: 9f2d1453fb ]
2019-05-09 09:59:18 +05:30
Alex Voicu
de15c6988d
Re-sync with upstream.
...
[ROCm/hip commit: fe959f7bd7 ]
2018-10-18 12:27:03 +01:00
Maneesh Gupta
c4a93adb74
Replace hipLaunchKernel -> hipLaunchKernelGGL
...
Change-Id: I4d99009e1199811d417becf1e1b934ec4d4e30be
[ROCm/hip commit: 52e320f396 ]
2018-10-17 14:32:25 +05:30
Maneesh Gupta
b35590db18
Implementation for stream priority
...
- Requires ROCm 1.9.x or higher
- Requires HCC with PR#886 merged
Change-Id: Id7c95ea091ee610e80c9ad815f1cb989cba570ca
[ROCm/hip commit: da64156fb2 ]
2018-10-05 16:27:46 +05:30
Alex Voicu
312d29ebaf
Align with HC Next.
...
[ROCm/hip commit: c6720e882b ]
2018-09-17 11:50:29 +03:00
Maneesh Gupta
4f42ee762d
Apply .clangformat to all repo source files
...
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344
[ROCm/hip commit: 1ba06f63c4 ]
2018-03-12 11:29:03 +05:30
Maneesh Gupta
c1f3d1409c
hipStreamAddCallback.cpp: Replace unistd sleep with sleep_for
...
Change-Id: I7a5d40a1acd8be76a0f175bcfa731ad89fb88d81
[ROCm/hip commit: e0b91d32dd ]
2018-01-31 10:48:17 +05:30
Maneesh Gupta
1429c44459
Fix hipStreamAddCallback testcase for nvcc
...
Change-Id: Ieec4b8d7933d8d68394d21d27132da206111efc8
[ROCm/hip commit: 5bce9ea5ef ]
2018-01-30 12:32:46 +05:30
Maneesh Gupta
02bedf46dc
Implement hipStreamAddCallback
...
Change-Id: Ib851e4d86ba9c8406ca37b88162ea483ccbc9d36
[ROCm/hip commit: cebb070d30 ]
2017-12-19 16:06:14 +05:30
Phaneendr-kumar Lanka
f8d610cf61
[nvccWarnings] Fix warnings seen with dtests on nvcc path
...
[ROCm/hip commit: eea7d495c7 ]
2017-12-14 14:10:37 +05:30
Ben Sander
8ef230eaaf
Temporarily disable a couple tests pending some HCC work
...
[ROCm/hip commit: 62cbe22d50 ]
2017-12-01 21:46:28 +00:00
Alex Voicu
8d51eaafb6
Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions."
...
This reverts commit 1c50968
[ROCm/hip commit: 32e11e7dc6 ]
2017-11-29 21:49:10 +00:00
Alex Voicu
fcc42f035e
Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions."
...
This reverts commit d2fd1f5
[ROCm/hip commit: fbaf729f88 ]
2017-11-29 21:36:29 +00:00
Alex Voicu
3c936777aa
Re-sync with upstream.
...
[ROCm/hip commit: c5f2b22d0d ]
2017-11-20 15:34:50 +00:00
Alex Voicu
962bf7bfda
This implements the trivial change needed to move back from the hip{Something}_{x, y, z} macros to the natural CUDA syntax of Something.{x, y, z}. This is contained in lines 384-404 in hip_runtime.h. All of the other changes have to do with changing unit tests to use this syntax. The macros are retained for backwards compatibility.
...
[ROCm/hip commit: cffd0e14eb ]
2017-11-19 01:54:12 +00:00
Alex Voicu
4950373967
Merge remote-tracking branch 'origin/master' into feature_use_module_based_dispatch_instead_of_pfe
...
# Conflicts:
# tests/src/runtimeApi/stream/hipStreamSync2.cpp
[ROCm/hip commit: 3d248927e4 ]
2017-11-08 10:26:30 +00:00
Alex Voicu
35d8af2001
Clean up trailing whitespace so as to reduce noise in #246 .
...
[ROCm/hip commit: d8e323d4b5 ]
2017-11-08 00:08:55 +00:00
Phaneendr-kumar Lanka
a8da9c1c3b
More tests for memory,stream & error APIs
...
[ROCm/hip commit: 093279b10b ]
2017-11-06 11:31:52 +05:30
Alex Voicu
70a41e7dac
This switches HIP from its currently convoluted macro + pfe based dispatch mechanism to a more natural one partially based on the existing module API. The basic idea is that HCC will always correctly emit __global__ functions: as empty-bodied stubs, on host, and as kernels, on device. It then becomes trivial to obtain the mangled name on host, at dispatch, from the function's address, and then to use the mangled name to retrieve the kernel. This should address all problems stemming from serialisation, dubious mismatches due to the manufactured functor, macro-isms et al. It also immediately enables support for generalised globals as a consequence of that being available in the module API. Finally, it will make debug much easier, since the actual names of the __global__ functions will automatically be used in traces etc. One detail is that due to how dispatch works now (hipLaunchKernel and hipLaunchKernelGGL are themselves variadic function templates which deduce the function type of the callee), in certain cases it may be necesssary to insert explicit casts to ensure that the variadic argument list selects a viable overload - this can be observed in some unit tests. Eventually we may be able to remove this limitation, but for now it does not appear terribly onerous. The code is not extremely HIPpie, nor is it fully optimised, but rather is intended as a starting point for the HIP team to make its own.
...
[ROCm/hip commit: c2482d1255 ]
2017-11-01 15:09:59 +00:00
Ben Sander
2a23d6dbe7
Refactor hipStreamWaitEvent
...
- Null streams use same flow as non-null.
- Add HIP_SYNC_STREAM_WAIT
- Resolve null stream.
[ROCm/hip commit: 882dab4536 ]
2017-08-31 03:00:14 +00:00
Rahul Garg
1d4213af20
Enable hipStreamSync2 and record_event dtests
...
[ROCm/hip commit: 4b98572f47 ]
2017-08-24 15:51:58 +05:30
Maneesh Gupta
3e230cfcc6
[dt] temporarily disable broken tests
...
Change-Id: I3ce23e410dc36e06d460263d768412f8368a6699
[ROCm/hip commit: b3a9e202b1 ]
2017-07-18 11:17:02 +05:30
Ben Sander
445042f916
Fix HIP_SYNC_NULL_STREAM=0 mode.
...
- Fix null-stream sync
- hipStreamDestroy of null stream returns hipErrorInvalidResourceHandle
- Update documentation.
- Add tests for null stream sync, hipEventElapsedTime.
- Rename internal enum hipEventStatusRecorded to hipEventStatusComplete
- refactor hipStreamWaitEvent to streamline control-flow
[ROCm/hip commit: 39c18e5e5f ]
2017-06-05 08:50:22 -05:00
Ben Sander
f3950e0748
Update tests.
...
Fix some NVCC issues.
Add hipStreamSync2, record_event tests.
[ROCm/hip commit: 8ce6d17983 ]
2017-06-04 20:18:37 -05:00
Ben Sander
c88190d698
Updates so hip compiles on CUDA.
...
[ROCm/hip commit: be8d0ba644 ]
2017-05-27 15:55:07 -05:00
Ben Sander
247c34195f
Expand test to cover copy followed by event sync
...
[ROCm/hip commit: 236ce70e94 ]
2017-05-23 23:15:45 -05:00
Ben Sander
a55ce5bee4
Add initial HIP_SYNC_NULL_STREAM=0 mode.
...
This eliminates host-synchronization for null stream. Instead, the
null-stream uses GPU-side events to wait for other streams.
Default is OFF pending additional testing.
Add enhanced null-stream test.
Also refine HIP_TRACE_API.
[ROCm/hip commit: 27877f8854 ]
2017-05-16 19:04:25 -05:00
Ben Sander
7d07d804d8
split debugging into separate .md file
...
[ROCm/hip commit: db097ab392 ]
2017-05-16 19:04:25 -05:00
Ben Sander
ff72a701b7
hipHostMalloc allocation are mapped to all devices by default.
...
Support hipHostMallocPortable flag.
Default flags are hipHostMallocPortable | hipHostMallocMapped.
Also:
-refactor tests to move addCount and addCountReverse into HipTest
namespace.
-test multi-GPU host memory.
[ROCm/hip commit: c3ccaa01e5 ]
2017-05-10 17:34:36 -05:00
Ben Sander
5d558861c2
Fix hipStreamWaitEvent for single GPU.
...
[ROCm/hip commit: e0c3ea15b2 ]
2017-05-10 13:23:49 -05:00
Ben Sander
2e2c773643
Update streamEventTEst.
...
- add checks for events across devices.
- refactor test to make sure it runs long enough to sensitive sync
techniques.
- add tests for DeviceSync, streamWaitEvent.
[ROCm/hip commit: 2d0f509de5 ]
2017-05-05 17:29:04 -05:00
wsttiger
3bf30acbd7
Improve hipStreamWaitEvent test.
...
- use addOne kernel, use local initializer rather than init_array.
- use addOneReverse test to add from back of array. Test alternate fwd and backward to stress dependency logic.
- check device-side dependencies.
[ROCm/hip commit: 2a253680da ]
2017-05-05 17:29:04 -05:00
Aditya Atluri
77401c9b64
Moved device code to mimic cuda header behavior
...
1. All fp32, fp64 math device/host functions should be in math_functions.h/.cpp
2. All fp32, fp64 fast math intrinsics for device/host functions should be in device_functions.h/.cpp
3. All the device code implementations should be in device_util.h/.cpp
4. Hence, made changes appropriately by moving code and creating new header files
5. Added math_functions.cpp/.h
6. Changed #ifndef signature to make sure no conflicts between headers with same names in hip/hip_runtime.h and hip/hcc_detail/hip_runtime.h
7. Changed tests to fit the code changes, making them to include appropriate headers
8. Added math_functions.cpp to CMakeLists.txt
9. Some of the tests are still broken, mostly host math functions will fix them in next commit
10. TODO: FIX compilation issues for host math functions
Change-Id: I7a17637d7e294a7d224ffba932c1a08668febd26
[ROCm/hip commit: b723169ee9 ]
2017-01-17 14:57:51 -06:00
pensun
5b80757b00
Modify hipStreamAddCallback test case to consider both NULL stream and stream
...
Change-Id: I8468c988f0f01c7d3f3176a01469d69bf7a68237
[ROCm/hip commit: 28aad46674 ]
2016-10-23 12:36:02 -05:00
pensun
ae0143e390
Add direct test for hipStreamAddCallback workaround
...
Change-Id: I890574eb30a76922888846882986edd0dc345309
[ROCm/hip commit: a7438ac3ee ]
2016-10-23 12:18:09 -05:00
Maneesh Gupta
70b6885995
Remove deprecated make and cmake files
...
Change-Id: I8cac0ec9cb997214559627425af207bbb9be0ddf
[ROCm/hip commit: 66f810ebaa ]
2016-10-07 11:44:26 +05:30
Maneesh Gupta
724a024bb6
directed tests: Updated to use new hip include path
...
Change-Id: Iab1aee638b7158eb9674a19625dedf6471947e51
[ROCm/hip commit: 7e04884d0f ]
2016-10-04 22:20:50 +05:30
Maneesh Gupta
a826689145
directed tests: Enable remaining tests in HIT infrastructure
...
Change-Id: I800ee00d6f7d339bb5d2ed898a16362a8541ed3a
[ROCm/hip commit: 4807279988 ]
2016-09-27 17:24:33 +05:30
Ben Sander
6445921e03
Add hipStreamQuery
...
Change-Id: Ib0813b1065feba4fe9ae861d24cfc6f9c5f580be
[ROCm/hip commit: 4e994a3025 ]
2016-09-07 15:18:34 -05:00
Ben Sander
4746d3002d
refactor ihipPreLaunchKernel phase#1
...
- Fix calls to HIP_INIT_API to pass all function arguments.
- Change ihipFunction to follow coding convention:
- leading underscore for member fields,
- camelCase for member fields.
- move kernel print function inside ihipPreLaunchKernel.
- add HIP_TRACE_API_COLOR, control color of messages.
- add ihipLogStatus wrapper to hipDeviceSynchronize()
Change-Id: I20bbb644da213f821404648945197254e3648fc9
[ROCm/hip commit: 48b1f7a6ea ]
2016-09-07 15:18:34 -05:00
Ben Sander
85e7d1799b
add hipStreamQuery on nvcc, fix hipStreamWaitEvent for nvcc
...
[ROCm/hip commit: 1f40a73ae1 ]
2016-09-02 17:26:16 -05:00
Ben Sander
1edcb06701
hipStreamWaitEvent update.
...
Add passed to hipStreamWaitEvent test.
Fix pointerAttrib test to work with new and old HCC versions.
Minor code touchup.
Change-Id: I139ba6ce9f6bf2b4bee89aebdec5981b4346ffc0
[ROCm/hip commit: 0923c2d261 ]
2016-09-02 09:46:59 -05:00
Ben Sander
85ae05c401
Add test for hipStreamWaitEvent
...
Change-Id: I157b33a78a0fc125b4b85f611f32f3b492f1b4d9
[ROCm/hip commit: 472999f5a3 ]
2016-09-02 09:46:59 -05:00
Ben Sander
55a7df207f
Fix test project names
...
Change-Id: I105c3759208ec832f3bdf6068029b4bfa2827909
[ROCm/hip commit: 55560ab8a0 ]
2016-06-17 15:18:57 -05:00
Ben Sander
89a14a6d73
Refactor directed test infrastructue.
...
- Add hierarchy. Tests now live in directories, each with its own
CMakeFiles.txt. Reduces merge conflicts.
- Change make_hip_executable -> build_hip_executable.
- Refresh docs.
- Enable some tests that were previously built but not run.
Change-Id: I8c5de3c954400bf233904282b8b42861a2b7c536
[ROCm/hip commit: 1b69b2e9f0 ]
2016-06-17 15:18:57 -05:00