Aditya Atluri
a3286737aa
fixed multi-dim module kernel launch
...
Change-Id: Id1d81f2375d058979ab526433f905cf0ea3d23d6
[ROCm/clr commit: 6dcdf08e0d ]
2016-11-11 12:25:23 -06:00
Ben Sander
5e354dcd77
Add option to deny peer access.
...
Also fix test.
Change-Id: I1b247f6c4271442b008e560669bca4daf8eb94c7
[ROCm/clr commit: d666fbaafe ]
2016-11-10 23:12:48 -06:00
Ben Sander
40f8947cc3
Use forceUnpinnedCopy to resolve P2p corner cases.
...
Change-Id: I2aebb419881246cebb696bec87798635bc71acc2
[ROCm/clr commit: 6e54a600b6 ]
2016-11-10 23:12:48 -06:00
Ben Sander
f634f73fef
Enable async copy again.
...
Also add HIP_FORCE_SYNC_COPY chicken bit.
Change-Id: I76a385410494b99bf27305d3c08f55dd81987565
[ROCm/clr commit: 0eeaa3bcd5 ]
2016-11-10 23:12:48 -06:00
Ben Sander
ee41609b48
Refactor copy and P2P logic.
...
Prefer use of source-engine for DMA copies, even if user submits copy
in a stream attached to a different device.
The stream is now used only for synchronization, and HIP
makes the most optimal decision for which engine to perform the
copy - typically the source copy engine.
HIP now makes decision on which engine should perform the copy
and passes this to HCC using new apis.
HIP has additional information about peer
visibility and will make a decision which agent should perform
the copy .
Change-Id: I0cf4cfebeae256e6ca795f08a7ed7130f4857d1f
[ROCm/clr commit: e767e0032e ]
2016-11-10 23:12:48 -06:00
Ben Sander
03fcf556e9
Improve Peer support and testing.
...
Change-Id: Icadc65988aaf145a265587ab0357c5bf4d26f3eb
[ROCm/clr commit: f3d38c2615 ]
2016-11-06 03:22:36 -06:00
Ben Sander
0af2722827
Set forceHostCopyEngine for other copy dirs. Support HIP_FORCE_P2P_HOST
...
Also: more debug for copy and P2p.
Change-Id: I87030c525410e041b2a00baaf6c68e6c0977ff42
[ROCm/clr commit: 06ecfa3975 ]
2016-11-04 19:53:23 -05:00
Ben Sander
06b9391974
Refactor resolve-mem step1
...
Change-Id: I7b8b2bbb56d7b31a97b48ebd42002641cd07a460
[ROCm/clr commit: 926e63c655 ]
2016-11-04 09:37:56 -05:00
Ben Sander
74c9c6e591
Add debug for Peer APIs. Enable PeerMemcpy APIs by default.
...
Change-Id: I46e39a9e7b07686a78484c1f3b5495b08e052fbb
[ROCm/clr commit: 00276d141e ]
2016-11-04 08:51:16 -05:00
Aditya Atluri
2d299543bf
added inter thread data movement intrinsics
...
Change-Id: I2a8a8ed49429cb7f96439bd28c4b83b5142737df
[ROCm/clr commit: f097b6ef81 ]
2016-11-01 16:37:33 -05:00
Ben Sander
c8aad6ee8e
Print short hipLaunchKernel correctly.
...
Change-Id: I6ca03d7c707cd03d6982199830213953d5855f17
[ROCm/clr commit: 3d0fa30183 ]
2016-10-27 23:09:32 -05:00
Ben Sander
4378a14789
Add initial hipProfileStart/Stop
...
And modify sample to show how to use.
Still needs some work to understand interaction with CXL.
Change-Id: I2579824d2dd7863ea23874d34f0dabb3cb305d3e
[ROCm/clr commit: 18dbafe6e8 ]
2016-10-27 23:09:32 -05:00
Ben Sander
6a06295e31
Add two levels of HIP_PROFILE_API (1=short,2=long)
...
Change-Id: I7ef98589f8731fb879db109fd573c62b489f2b61
[ROCm/clr commit: 1d5034f583 ]
2016-10-27 23:09:31 -05:00
Ben Sander
44127ad800
Fix scoped marker so begin/end ATP timestamps correct
...
Change-Id: Ic944d3fc00d7bc31b756c0e6c327b99eb489537e
[ROCm/clr commit: 90adf98a7e ]
2016-10-27 23:09:31 -05:00
Ben Sander
e0a3b2472c
Rename HIP_ATP_MARKER and profiling vars
...
HIP_PROFILE_API
HIP_DB_START_API
HIP_DB_STOP_API
Change-Id: I6c4da67212ff8217e6356a2622d4c6278a188c34
[ROCm/clr commit: f7c42efa3f ]
2016-10-27 23:09:31 -05:00
Ben Sander
fd2e0db1f8
Allow HIP_DB to be number or string flags (ie HIP_DB=api+mem+sync)
...
Add callbacks for processing env vars.
Change-Id: I4ddf50e2da56b1dae43f50657bc693b07b23c03d
[ROCm/clr commit: caf446fe53 ]
2016-10-27 23:09:31 -05:00
Ben Sander
22ae54b4cc
Add HIP_PROFILE_START_API, HIP_PROFILE_STOP_API
...
Refactor HIP_INIT_API to call recordApiTrace.
Change-Id: Ieff4b5018236f59e49e1b9841474440a34f821df
[ROCm/clr commit: 3132c36471 ]
2016-10-27 23:09:31 -05:00
Ben Sander
147cd45ebf
Add per-thread API seqnum to debug
...
Change-Id: Ib13733a3e84cd56bae13a32bae40f936c20b7543
[ROCm/clr commit: 45e2dd4d69 ]
2016-10-27 23:09:31 -05:00
Ben Sander
4029bc31e6
Improve HIP TID printing in debug mode.
...
Map long thread-id to a short one that is printed with each message.
Remove clunky stirng creation code for tid_tr.
Print TID on every message.
Change-Id: I780a91d8ce789cb4957789036b478bf5cde8c4e4
[ROCm/clr commit: 7d69e858a5 ]
2016-10-27 23:09:31 -05:00
Aditya Atluri
c58f5af811
reverted change for cache size query
...
Change-Id: I44a1f43818cd287a2a3b6265f43d183f9bd5b71c
[ROCm/clr commit: 8145e1b129 ]
2016-10-25 11:03:35 -05:00
Aditya Atluri
71ac51b965
correct cachesize to output correct value
...
Change-Id: I5db031591eb718b0c12e78a35e4b19349de9526d
[ROCm/clr commit: e28f65604b ]
2016-10-25 09:33:45 -05:00
Ben Sander
3dea23ed3b
Fix P2P for async
...
Also improve HIP debug message: Add more DB_COPY1 messages. memcpyStr,
expand HIP_DB bitmask.
[ROCm/clr commit: 714968cdc6 ]
2016-10-20 10:02:23 -05:00
Ben Sander
e53561c960
Add HIP_WAIT_MODE env var.
...
Also weaken cases where hipSetDeviceFlags returns hipErrorInvalidValue.
Change-Id: I7f113338be6fe498eaf1ab40fd0fd6b23849bb5e
[ROCm/clr commit: d4b23da91f ]
2016-10-18 22:27:16 -05:00
Ben Sander
7fdf4828ec
Add hipDeviceSchedule* support to queue wait
...
Change-Id: Iffa7a356500b026f3737c3f5719ca9f62b10d855
[ROCm/clr commit: c7303d5924 ]
2016-10-18 22:27:16 -05:00
Ben Sander
e9997ea992
Remove some TODO items
...
Change-Id: I7e9de2e43a8584f8dc9ee6d45c8ed00ca465f591
[ROCm/clr commit: 0787c41ac0 ]
2016-10-18 22:27:16 -05:00
Ben Sander
d6ffcdb9b0
Move some internal headers from "include/hip/" to src.
...
Change-Id: I7041bd5c803d9318979f4a7c1d658445c614691e
[ROCm/clr commit: 403cdf93c3 ]
2016-10-18 22:27:16 -05:00
Maneesh Gupta
2655c96ab9
src/*: Update copyright header
...
Change-Id: I455f5d0d12fe9cb39a3ba873bd22b4c25ed07cbf
[ROCm/clr commit: 88d6cad3fb ]
2016-10-15 22:55:22 +05:30
Ben Sander
fc7eefb5c8
Cleanup files from code review.
...
- Remove some stale code
- Update docs
- Correct define for __HIP_ARCH_HAS_GLOBAL_INT64_ATOMICS__
Change-Id: Ic5e3cdb8269b1c18f6d2693700b55e08c4d0080e
[ROCm/clr commit: aa3e04cf9a ]
2016-10-15 11:51:20 -05:00
Ben Sander
57adbf2a17
Add code to use new HCC API accelerator_view::dispatch_hsa_kernel.
...
Disabed by default, can enable with USE_DISPATCH_HSA_KERNEL=1
Change-Id: I7a6ba76f2bada34952ed47f5335ce695fa2faea5
[ROCm/clr commit: dcadaadb24 ]
2016-10-14 23:46:29 -05:00
Ben Sander
4c69e2c2f8
Fix HIP_USE_PRODUCT_NAME detection.
...
Change-Id: I6879ec3a11845bea66a18a9328bd4eaf54713420
[ROCm/clr commit: 45bc107ad0 ]
2016-10-13 11:51:53 -05:00
pensun
eecfd8e141
Add ifdef guard for the feature requires ROCm1.3
...
Change-Id: I7154517c47000c37fe5eb09a3c1cf2a9aacbe27c
[ROCm/clr commit: 0ac70e7184 ]
2016-10-13 10:57:31 -05:00
Aditya Atluri
b82a22ff7a
added constant memory property to 16KB
...
Change-Id: If067b4057c2e3fc0c26cf4604a1d4fac7f139b12
[ROCm/clr commit: e25a1e50b3 ]
2016-10-13 10:47:40 -05:00
pensun
f638d13f7c
Change to query device name using HSA_AMD_AGENT_INFO_PRODUCT_NAME;
...
Note: this commit depends on ROCR runtime in ROCm 1.3 release.
Change-Id: I90385ef6d11ee8a1e8adae1d3fdf21747347544c
[ROCm/clr commit: 44cc44011b ]
2016-10-12 20:01:30 -05:00
Aditya Atluri
cd32c9418e
Added hipDeviceGetLimit api
...
1. hipDeviceGetLimit API for HCC path is added
2. Test for hipDeviceGetLimit API is added
3. The feature added only supports querying heap size
4. Corrected indents for malloc and free device functions
5. Removed redundant data structures
6. Added g_heap_malloc_size to store the heap size
Change-Id: If48d1b0ce9270e994f1c542cc283ddbb14746bbb
[ROCm/clr commit: e5325a1ab4 ]
2016-10-12 19:58:48 -05:00
Aditya Atluri
caa6a298e7
added malloc and free device functions
...
1. Added malloc and free device functions
2. Added test which check malloc and free functions
TODO: Need to add support for multiple device. Works only on one device (multi device support id NOT available).
Change-Id: Id11fc36463915d6ad46c264d5a20c8feb2d2c17c
[ROCm/clr commit: 2918ff273d ]
2016-10-12 19:08:34 -05:00
Ben Sander
a79b334fbc
Add DISABLE_COPY_EXT option.
...
[ROCm/clr commit: 250f711ed0 ]
2016-10-05 12:18:42 -05:00
Ben Sander
8e0733f958
Add HIP_BLOCKING_SYNC environment var to control stream sync behavior.
...
[ROCm/clr commit: 6950d3f9e9 ]
2016-10-05 12:18:42 -05:00
Maneesh Gupta
46feb7dcf2
Move include/* to include/hip/*
...
Change-Id: I7a7b2839b4df59c7a4c503550f99fdc9e45c0f54
[ROCm/clr commit: bbfc08f419 ]
2016-10-04 22:17:18 +05:30
Ben Sander
d5d764a4d4
Refactor asyncCopy and syncCopy to fix deadlock case.
...
- Minimize time that locks are held.
- Eliminate copy code that locked stream and ctx at same time.
- Stream was locked to ensure thread-safe enqueue to the queue.
- Devices were locked to query peer-lists.
Change-Id: Ibe8880bb7fb995a3da8f90ff911f212d81525018
[ROCm/clr commit: 806e58ca63 ]
2016-09-27 15:45:40 -05:00
Ben Sander
a0ec18c516
Add debug option to print ThreadID with each message.
...
Also print messages with single fprintf to prevents threads from
interleaving.
Change-Id: Ib3999fe6b1e67b4a16cd7dcde82f3dfc99dd48ff
[ROCm/clr commit: 4fd4168796 ]
2016-09-27 15:45:40 -05:00
Ben Sander
46a4854bae
Fix signal resource issue.
...
Remove memory leak with new hc::completion_future.
Implement HIP_LAUNCH_BLOCKING with queue-level wait.
Change-Id: I45975f81c4d239fdeed7776970988d28449865dc
[ROCm/clr commit: f6717e326e ]
2016-09-26 16:47:32 -05:00
Ben Sander
4cf9803703
Peer-to-Peer improvements.
...
- Bug fix for peer visibility. Now contexts correctly detect when they can use SDMA for P2P vs staging buffers.
- Interface to new HCC copy_ext function.
- Improve context and peer print /debug options.
- Add comments and usage to hipPeerToPeer_simple test.
[ROCm/clr commit: 944d4eaa18 ]
2016-09-22 14:21:19 -05:00
Ben Sander
03866f0ee5
Remove unpinned_copy code. Other cleanup.
...
Change-Id: Ie3f71439cf1ba729ef223d078917c403d3de879a
[ROCm/clr commit: 926aefa930 ]
2016-09-22 14:21:19 -05:00
Ben Sander
8e55e13469
Cleanup. Remove cfs, ihipSignal_t, staging buffer calls.
...
Change-Id: I8bb67c484e3a65be06a03665f059217930da2bed
[ROCm/clr commit: 5bc18c8603 ]
2016-09-22 14:21:19 -05:00
Ben Sander
8340e57194
Cleanup: Remove HIP signal pool.
...
Change-Id: Icebfd0509d12396cc5933d5556d68b53e1be36e0
[ROCm/clr commit: 17e21309f1 ]
2016-09-22 14:21:19 -05:00
Ben Sander
dbbd5ce037
Remove HIP command dependency tracking.
...
Change-Id: I991c13bc5108193959ba70f9f6f9c692c9ad3a5b
[ROCm/clr commit: c365785c5c ]
2016-09-22 14:21:19 -05:00
Ben Sander
bafa586cf5
Cleanup, remove preCopyCommand.
...
Change-Id: I3768d3789a99be8136b43179d4152fa1875665cb
[ROCm/clr commit: b0509c5a58 ]
2016-09-22 14:21:19 -05:00
Ben Sander
c291e03ce8
Change HIP async copy to call av::copy_async.
...
Change-Id: I4274b63ced3940d5249c32bd9d156296529c70e8
[ROCm/clr commit: 3596901c3d ]
2016-09-22 14:21:19 -05:00
Ben Sander
8240ac127f
Use HCC's synchronous accelerator_view::copy
...
Replace large block of HIP code with a call to HCC av::copy().
Change-Id: Ic32e1801cf8d4cd116ac02b72c41b1a1e4b6065c
[ROCm/clr commit: 8598d8c6d3 ]
2016-09-22 14:21:19 -05:00
Ben Sander
2f4c30ff79
Remove USE_AV_COPY, USE_PEER_TO_PEER fallback paths.
...
Change-Id: I9c20173e62029c4caebabc98784c6d7697758e4f
[ROCm/clr commit: 60f797cc5a ]
2016-09-22 14:21:19 -05:00