Alex Voicu
907d41df77
Re-sync with upstream.
2017-11-24 13:04:12 +00:00
Maneesh Gupta
4c96882366
Fix float2int rounding functions
...
Change-Id: I67943859a6344c5eec0eaa23418c9b802ef72468
2017-11-23 09:57:24 +05:30
Ben Sander
e8ede28ec4
Merge pull request #264 from pzins/missing_end_marker
...
Fix missing MARKER_END
2017-11-20 06:08:01 -06:00
Alex Voicu
cffd0e14eb
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.
2017-11-19 01:54:12 +00:00
Alex Voicu
6fa7adf077
This actually (tries) to do the right thing all the way, by using memcpy for bitcasting, and not rely on undefined behaviour of a different flavour as a substitute for the original undefined behaviour. Note that the compiler will (should) optimise down to the same emitted code, since this is a pattern it understands.
2017-11-18 01:16:31 +00:00
Alex Voicu
153878e368
This fixes some outright quaint choices made when implementing HIP's bitwise conversion functions, by using simple reinterpret_casts, as is idiomatic. These functions are supposed to be re-entrant, correct and efficient. Sadly, they were neither: they hid a massive race condition against a value stored in global memory, which means that they were also unreasonably slow if they ever managed to be correct, and relied on union based type punning which is in a grey area of the standard. It is difficult to ascertain what may have been the reason for coming up with this quirky solution.
2017-11-17 16:00:28 +00:00
Pierre
6baaed8e48
Fix missing MARKER_END
...
Logging status of hipCtxSynchronize was missing
Test if hip profiling is active for MARKER_END in ihipPostLaunchKernel
Add MARKER_END after the completion of a kernel launched through
the "grid launch"
2017-11-13 16:13:19 -05:00
Maneesh Gupta
31bcb59f62
Merge pull request #250 from AlexVlx/feature_add_agent_global_support
...
Support for agent globals
2017-11-09 07:52:09 +05:30
Alex Voicu
d8e323d4b5
Clean up trailing whitespace so as to reduce noise in #246 .
2017-11-08 00:08:55 +00:00
Ben Sander
f278f67d2d
Check for null event in hipEventElapsedTime
2017-11-06 23:49:31 +00:00
Ben Sander
16708dd2e0
hipStreamWaitEvent returns success if event created but not recorded
2017-11-06 23:49:31 +00:00
Ben Sander
4a2e6f8955
Make hipEvent_t thread safe.
...
Support re-recording of same event by different threads.
- Add criticalData structure to hipEvent_t, similar to mechanism used
for streams, contexts, device. Events are always locked
after streams to avoid deadlock.
- ihipEvent_t::locked_copyCrit can be used to copy critical state
including marker. The critical state in the event can then
be re-recorded.
- refactor hipEventElapsedTime. Remmove stale debug code, native signal
refs.
2017-11-06 23:49:25 +00:00
Maneesh Gupta
1131c9e41a
Merge pull request #251 from ROCm-Developer-Tools/fix_event_state
...
Set event state AFTER it is recorded.
2017-11-06 07:28:11 +05:30
Maneesh Gupta
a62d5aa875
Merge pull request #249 from bensander/warn_event
...
Add HIP_DB=warn + message if sync on dangerous event.
2017-11-06 07:25:40 +05:30
Ben Sander
4c3b65a5cd
Set event state AFTER it is recorded.
2017-11-05 10:33:18 -06:00
Alex Voicu
328c18b886
This introduces correct support for agent global variables, and implements hipModuleGetGlobal as an actual equivalent for cuModuleGetGlobal.
2017-11-03 01:44:48 +00:00
Ben Sander
09d866a639
Merge pull request #237 from bensander/use_ctxptr_for_p2p
...
Use ctxptr for p2p
2017-11-01 18:55:25 +01:00
Ben Sander
70c25bdf8e
Add HIP_DB=warn + message if sync on dangerous event.
2017-11-01 10:44:34 -07:00
Ben Sander
86f62accfd
Merge pull request #245 from scchan/centos_fixes
...
various fixes for centos/rhel
2017-11-01 18:10:29 +01:00
Siu Chi Chan
99d32a195f
Centos/RHEL - remove usage of constexpr since libc++ doesn't enable ctor for constexpr pair in C++11
2017-10-31 18:16:12 +00:00
Ben Sander
7e908bdec8
Add ns-level timer for HIP API routines
...
Refactor some miuses of ihipLogStatus, these should only be in top-level
HIP APIs and should be paired with HIP_API_INIT calls.
2017-10-30 20:20:51 +00:00
Ben Sander
2e8ec71e40
Merge pull request #222 from bensander/fix_device_prop
...
Fix device prop
2017-10-30 17:58:48 +01:00
Ben Sander
d610f16c47
Check for null copyEngine before looking at peers.
2017-10-30 16:58:03 +00:00
Siu Chi Chan
a9789ddcda
Merge remote-tracking branch 'origin/master' into HEAD
2017-10-27 01:18:28 -04:00
Ben Sander
f288f24e95
Merge pull request #198 from AlexVlx/feature_support_globals_for_module_api
...
Feature support globals for module api
2017-10-27 01:53:34 +02:00
Ben Sander
7d30f32332
Fix bug with peer-to-peer combined with context API
...
- Store context inside the tracker rather than using int deviceID that
was always mapped to primary context
- IsPeerWatcher now based on device IDs rather than specific peers.
2017-10-26 19:44:22 +00:00
Aditya Atluri
5d646d0fe3
Enhance debug for copy pointers
...
- show more pointer tracking fields
- show pointer info before and after "tailoring'
2017-10-26 19:44:22 +00:00
Siu Chi Chan
d91a4f5bd6
add HC_FEATURE_PRINTF around the printf buffer definition
2017-10-25 12:00:02 -04:00
Siu Chi Chan
1ddee10c2f
printf support for module API
2017-10-24 00:55:41 -04:00
Siu Chi Chan
5b9ce032d6
replace __hcc_workweek__ with HC_FEATURE_PRINTF flag
2017-10-23 18:30:08 -04:00
Maneesh Gupta
b792f9f507
Make elfio headers private
...
Change-Id: I3ba174bb46e84a75380207d93a0da6fe3703689e
2017-10-23 10:24:36 +05:30
Ben Sander
dd24983571
Remove printf
2017-10-20 13:24:04 -07:00
Ben Sander
acf89b43d4
Update device properties.
...
- clear properties to defined initial state.
- enable some property flags which are now supported.
2017-10-20 15:52:13 +00:00
Ben Sander
c9f906c2ce
Modify device properties to use pool API.
...
- Also better error code checking
2017-10-20 14:49:29 +00:00
Siu Chi Chan
ccef1cbd6e
hipDeviceReset(): make sure to reinitialize the printf buffer in hcc RT
2017-10-18 16:26:13 -04:00
Alex Voicu
70786a5563
This fixes incorrect usage of the reader object, which created arcane
...
mismatches when one reader accessed another's section.
2017-10-09 15:46:38 +01:00
Alex Voicu
ffffe052b6
This adds cursory support for globals to the HIP module loading API. The
...
style is purposefully alien so as to signal that HIP experts should turn
it into HIP worthy code as soon as possible.
2017-10-09 13:27:11 +01:00
Rahul Garg
9929e8e717
Fixed hipTexture fetch issue
2017-09-25 06:54:29 +05:30
Wen-Heng (Jack) Chung
c74d3fe2cb
Bump device major version from 2 to 3
...
This would significantly improve performance for certain apps in kernel
selection logic.
2017-09-15 15:47:39 +00:00
Ben Sander
3ed5f42dad
Merge pull request #179 from gargrahul/fix_hipmallocarray
...
Fixed hipMallocArray for 1D cases
2017-09-14 12:59:33 -05:00
Ben Sander
fbd22c3e49
Merge branch 'master' into hip_init_alloc
2017-09-14 11:53:33 -05:00
Ben Sander
cea80cd8b3
Add HIP_INIT_ALLOC to init allocated memory.
2017-09-13 23:31:48 +00:00
Rahul Garg
2a915b2790
Fixed hipMallocArray for 1D cases
2017-09-12 21:52:11 +05:30
Ben Sander
4ac6d643c1
hipStreamQuery uses av::is_empty. Add HIP_FORCE_NULL_STREAM.
2017-08-31 03:00:14 +00:00
Ben Sander
882dab4536
Refactor hipStreamWaitEvent
...
- Null streams use same flow as non-null.
- Add HIP_SYNC_STREAM_WAIT
- Resolve null stream.
2017-08-31 03:00:14 +00:00
Ben Sander
cc08b36647
Merge pull request #167 from bensander/event_safety
...
Event safety
2017-08-29 13:55:46 -05:00
Ben Sander
6ff74d0e97
Lock streams when waiting on event completion or querying event safety.
2017-08-28 18:40:16 -05:00
Rahul Garg
38c9febe21
Null check on input pointer arguments
2017-08-25 08:46:34 +05:30
Rahul Garg
38ecfb9384
Device count check on input device id
2017-08-22 14:05:44 +05:30
Ben Sander
e3161bb40e
Add some new HIP_TRACE_API options.
2017-08-16 04:00:33 +00:00