Граф коммитов

240 Коммитов

Автор SHA1 Сообщение Дата
Ben Sander ab1836544a Fix scoped marker so begin/end ATP timestamps correct
Change-Id: Ic944d3fc00d7bc31b756c0e6c327b99eb489537e
2016-10-27 23:09:31 -05:00
Ben Sander e9056798f6 Rename HIP_ATP_MARKER and profiling vars
HIP_PROFILE_API
HIP_DB_START_API
HIP_DB_STOP_API

Change-Id: I6c4da67212ff8217e6356a2622d4c6278a188c34
2016-10-27 23:09:31 -05:00
Ben Sander f5e8090f2f Allow HIP_DB to be number or string flags (ie HIP_DB=api+mem+sync)
Add callbacks for processing env vars.

Change-Id: I4ddf50e2da56b1dae43f50657bc693b07b23c03d
2016-10-27 23:09:31 -05:00
Ben Sander 710be682ca Add HIP_PROFILE_START_API, HIP_PROFILE_STOP_API
Refactor HIP_INIT_API to call recordApiTrace.

Change-Id: Ieff4b5018236f59e49e1b9841474440a34f821df
2016-10-27 23:09:31 -05:00
Ben Sander 739bc37503 Add per-thread API seqnum to debug
Change-Id: Ib13733a3e84cd56bae13a32bae40f936c20b7543
2016-10-27 23:09:31 -05:00
Ben Sander 346c519ace 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
2016-10-27 23:09:31 -05:00
Aditya Atluri e1c1b4c009 reverted change for cache size query
Change-Id: I44a1f43818cd287a2a3b6265f43d183f9bd5b71c
2016-10-25 11:03:35 -05:00
Aditya Atluri 820a914b98 correct cachesize to output correct value
Change-Id: I5db031591eb718b0c12e78a35e4b19349de9526d
2016-10-25 09:33:45 -05:00
Ben Sander 203348ac9b Fix P2P for async
Also improve HIP debug message: Add more DB_COPY1 messages. memcpyStr,
expand HIP_DB bitmask.
2016-10-20 10:02:23 -05:00
Ben Sander 000d75de95 Add HIP_WAIT_MODE env var.
Also weaken cases where hipSetDeviceFlags returns hipErrorInvalidValue.

Change-Id: I7f113338be6fe498eaf1ab40fd0fd6b23849bb5e
2016-10-18 22:27:16 -05:00
Ben Sander 261ff423e1 Add hipDeviceSchedule* support to queue wait
Change-Id: Iffa7a356500b026f3737c3f5719ca9f62b10d855
2016-10-18 22:27:16 -05:00
Ben Sander d21d3ec222 Remove some TODO items
Change-Id: I7e9de2e43a8584f8dc9ee6d45c8ed00ca465f591
2016-10-18 22:27:16 -05:00
Ben Sander 9315ac1a29 Move some internal headers from "include/hip/" to src.
Change-Id: I7041bd5c803d9318979f4a7c1d658445c614691e
2016-10-18 22:27:16 -05:00
Maneesh Gupta 8471682f26 src/*: Update copyright header
Change-Id: I455f5d0d12fe9cb39a3ba873bd22b4c25ed07cbf
2016-10-15 22:55:22 +05:30
Ben Sander c54220eca9 Cleanup files from code review.
- Remove some stale code
- Update docs
- Correct define for __HIP_ARCH_HAS_GLOBAL_INT64_ATOMICS__

Change-Id: Ic5e3cdb8269b1c18f6d2693700b55e08c4d0080e
2016-10-15 11:51:20 -05:00
Ben Sander 50e0a363ce 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
2016-10-14 23:46:29 -05:00
Ben Sander 89012201c9 Fix HIP_USE_PRODUCT_NAME detection.
Change-Id: I6879ec3a11845bea66a18a9328bd4eaf54713420
2016-10-13 11:51:53 -05:00
pensun b70409f3ad Add ifdef guard for the feature requires ROCm1.3
Change-Id: I7154517c47000c37fe5eb09a3c1cf2a9aacbe27c
2016-10-13 10:57:31 -05:00
Aditya Atluri 237837d9bd added constant memory property to 16KB
Change-Id: If067b4057c2e3fc0c26cf4604a1d4fac7f139b12
2016-10-13 10:47:40 -05:00
pensun c3f375327f 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
2016-10-12 20:01:30 -05:00
Aditya Atluri 62ec53740c 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
2016-10-12 19:58:48 -05:00
Aditya Atluri d24a7ef12b 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
2016-10-12 19:08:34 -05:00
Ben Sander dee364cb08 Add DISABLE_COPY_EXT option. 2016-10-05 12:18:42 -05:00
Ben Sander 821080487a Add HIP_BLOCKING_SYNC environment var to control stream sync behavior. 2016-10-05 12:18:42 -05:00
Maneesh Gupta b951cc99ed Move include/* to include/hip/*
Change-Id: I7a7b2839b4df59c7a4c503550f99fdc9e45c0f54
2016-10-04 22:17:18 +05:30
Ben Sander 4ff6dc8f38 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
2016-09-27 15:45:40 -05:00
Ben Sander 6de9136002 Add debug option to print ThreadID with each message.
Also print messages with single fprintf to prevents threads from
interleaving.

Change-Id: Ib3999fe6b1e67b4a16cd7dcde82f3dfc99dd48ff
2016-09-27 15:45:40 -05:00
Ben Sander 225e37fdc9 Fix signal resource issue.
Remove memory leak with new hc::completion_future.
Implement HIP_LAUNCH_BLOCKING with queue-level wait.

Change-Id: I45975f81c4d239fdeed7776970988d28449865dc
2016-09-26 16:47:32 -05:00
Ben Sander c769abcbeb 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.
2016-09-22 14:21:19 -05:00
Ben Sander c645e53fdd Remove unpinned_copy code. Other cleanup.
Change-Id: Ie3f71439cf1ba729ef223d078917c403d3de879a
2016-09-22 14:21:19 -05:00
Ben Sander e0ce1d3954 Cleanup. Remove cfs, ihipSignal_t, staging buffer calls.
Change-Id: I8bb67c484e3a65be06a03665f059217930da2bed
2016-09-22 14:21:19 -05:00
Ben Sander 12cb1d88aa Cleanup: Remove HIP signal pool.
Change-Id: Icebfd0509d12396cc5933d5556d68b53e1be36e0
2016-09-22 14:21:19 -05:00
Ben Sander 7530fa6dbe Remove HIP command dependency tracking.
Change-Id: I991c13bc5108193959ba70f9f6f9c692c9ad3a5b
2016-09-22 14:21:19 -05:00
Ben Sander 8c4cecf367 Cleanup, remove preCopyCommand.
Change-Id: I3768d3789a99be8136b43179d4152fa1875665cb
2016-09-22 14:21:19 -05:00
Ben Sander 9c9b0ab555 Change HIP async copy to call av::copy_async.
Change-Id: I4274b63ced3940d5249c32bd9d156296529c70e8
2016-09-22 14:21:19 -05:00
Ben Sander da44f3f907 Use HCC's synchronous accelerator_view::copy
Replace large block of HIP code with a call to HCC av::copy().

Change-Id: Ic32e1801cf8d4cd116ac02b72c41b1a1e4b6065c
2016-09-22 14:21:19 -05:00
Ben Sander e843d8cb51 Remove USE_AV_COPY, USE_PEER_TO_PEER fallback paths.
Change-Id: I9c20173e62029c4caebabc98784c6d7697758e4f
2016-09-22 14:21:19 -05:00
Ben Sander ccc1bbe6b1 Remove HIP_STAGING_BUFFER
Code simplification/cleanup:
Remove stale fallback paths that uses something besides the unpinned engine.
Remove HIP_STAGING_BUFFER env var - now is const 2, 0 no longer has
special meaning.

Change-Id: I7d24cdd1067dd0c244e87b6a83897cb135d307e7
2016-09-22 14:21:18 -05:00
Ben Sander 442d74f027 Move isLargeBar to UnpinnedCopyEngine constructor.
Change-Id: I7a7d3a40b1d4e0c6ec856658a6a70e5e70d287ce
2016-09-22 14:21:18 -05:00
Ben Sander e300cb4405 Refactor Staging Buffer CopyDeviceToHost
Use copyMode.  Embed algorithm selection inside the unpinned class.

Change-Id: Ic75fd5931717a3160904402794bbed3ccd445112
2016-09-22 14:21:18 -05:00
Ben Sander c532de9f5a Refactor staging buffer CopyHostToDevice.
- Move algorithm selection inside Unpinned class.
- Refactor function names.
- Use size_t for size threshholds.

Change-Id: Iac4de652ac9d49acbf527aa0849e388b8ecd8486
2016-09-22 14:21:18 -05:00
Ben Sander 83140f8423 Updates docs for hipHcc* functions, move to header 2016-09-22 13:05:47 -05:00
Aditya Atluri 7407cb2600 added more error codes to hipErrorGetString
Change-Id: I80c675905d94813502040fd0caa07985fa8c7dcc
2016-09-15 11:28:18 -05:00
Aditya Atluri 8110f562ab added new error reporting case
Change-Id: I5f0a37dbe396412f5602d04df19d538e451c2696
2016-09-15 10:50:26 -05:00
Aditya Atluri f03570d8cc Added signal management which passes stress tests
Change-Id: I7e1660a8ca2c5ee580a91f76eae9a58ca49f0457
2016-09-08 14:52:51 -05:00
Ben Sander 4e994a3025 Add hipStreamQuery
Change-Id: Ib0813b1065feba4fe9ae861d24cfc6f9c5f580be
2016-09-07 15:18:34 -05:00
Ben Sander 48b1f7a6ea 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
2016-09-07 15:18:34 -05:00
Aditya Atluri 2c2f6ab078 Fixed group and private memory size to AQL
Change-Id: I6e721f63fe5697b7b90a7d25add9aa024d9dc429
2016-09-07 12:57:18 -05:00
Ben Sander cdba60a566 Fix double-lock of stream on hipModuleLaunchKernel
Change-Id: I4ca164971c25f4eb8fbcca11d6258367bb3d2ab4
2016-09-02 12:47:49 -05:00
Ben Sander db9fe9f494 Only use ihipLogStatus from top-level HIP functions.
Change-Id: I07e9c088d5c16a79ed52cb008a798889a656016c
2016-09-02 09:46:59 -05:00