Commit Graph

1133 Commits

Author SHA1 Message Date
Aditya Atluri 68b3ae7fce Added feature for memcpy to Symbol
1. Currently works only for __attribute__((addrspace(1))
2. Need to pass in string for name of the variable
3. Added test to check functionality

Change-Id: I4c3cc1bf151cb5423e4aef59fcc4ad5693b31641


[ROCm/clr commit: 89b576da65]
2016-10-11 12:09:58 -05:00
Aditya Atluri df5370763a added threadfence feature for hcc
1. Added feature for __threadfence and __threadfence_block
2. Added feature for using LLVM IR files directly while compilation
3. Added test for threadfence and threadfence_block

Change-Id: Ib7e5d89b4cca1a135952b317e5809cd05b56a3c9


[ROCm/clr commit: 09c9953649]
2016-10-10 15:29:50 -05:00
Maneesh Gupta 4cef1070b2 Add back deprecated hipHostAlloc, hipMallocHost, hipFreeHost
Change-Id: Ib8494078c852b07e1958c3acc21fa1866542122c


[ROCm/clr commit: b59659f0c7]
2016-10-09 16:30:46 +05:30
Elias Konstantinidis c7da2fe434 Added support for __mul24 and __umul24
[ROCm/clr commit: adc763f440]
2016-10-06 09:29:36 +05:30
Ben Sander a79b334fbc Add DISABLE_COPY_EXT option.
[ROCm/clr commit: 250f711ed0]
2016-10-05 12:18:42 -05:00
Ben Sander c348792a58 Don't save error status on ihip function.
[ROCm/clr commit: 3ea5aac9a3]
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
Aditya Atluri ef4ed33772 Fixed hipDeviceGetAttribute
1. Added negative test for hipDeviceGetAttribute
2. Fixed hipDeviceGetAttribute if int ptr input is null

Change-Id: I0e31f50fa407701fddf96e4eb64a87a371ff5d95


[ROCm/clr commit: 04b68a515d]
2016-09-27 13:33:42 -05:00
Aditya Atluri 99095ec70e added more device negative testing
1. Added fallback for nullptr to hipGetDeviceProperties and hipGetDeviceCount
2. Added negative tests for hipGetDeviceProperties and hipGetDeviceCount

Change-Id: Iac93fd53d7d4794fb10546ddadf6ca802b047c87


[ROCm/clr commit: 4299316039]
2016-09-27 13:04:35 -05:00
Aditya Atluri 0f1df51a33 fallthrough if deviceId pointer is null
Change-Id: I924996d60d0286a7be1d18881ee733459de2981c


[ROCm/clr commit: 57872d2a88]
2016-09-27 11:47:58 -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
Rahul Garg 0206224b5e Removed deprecated hipHostAlloc
Change-Id: Ia592a3545c5d72f37e049ce29f910e404323c01c


[ROCm/clr commit: c313836013]
2016-09-26 10:58:46 +05:30
Rahul Garg 71d0254bd4 Removed deprecated hipMallocHost
Change-Id: I3141fe05a34b6a306297a30721509965f49ccb97


[ROCm/clr commit: f5b463702e]
2016-09-26 05:52:21 +05:30
Rahul Garg eedc7f410e Removed deprecated hipFreeHost
Change-Id: I9747ea3993090e0da6a2e1f5e9ce318762bc03e1


[ROCm/clr commit: 3a6acd044b]
2016-09-26 05:35:14 +05:30
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 e32f07802e Fix HIP_INIT_API and ihipLogStatus calls
[ROCm/clr commit: fd6c09602f]
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
Ben Sander 16f818b60f 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


[ROCm/clr commit: 39750da9a5]
2016-09-22 14:21:18 -05:00
Ben Sander 25c24e1694 Fix bugs for different CopyModes
Change-Id: Ie59fb3b36a9ff2de178307a6d5756b5c71e0306b


[ROCm/clr commit: 271e2357e0]
2016-09-22 14:21:18 -05:00
Ben Sander 872c63b03a Move isLargeBar to UnpinnedCopyEngine constructor.
Change-Id: I7a7d3a40b1d4e0c6ec856658a6a70e5e70d287ce


[ROCm/clr commit: 17d7fc586e]
2016-09-22 14:21:18 -05:00
Ben Sander 435c528fd4 Refactor Staging Buffer CopyDeviceToHost
Use copyMode.  Embed algorithm selection inside the unpinned class.

Change-Id: Ic75fd5931717a3160904402794bbed3ccd445112


[ROCm/clr commit: 77c86934c1]
2016-09-22 14:21:18 -05:00
Ben Sander 91b43c493b Refactor staging buffer CopyHostToDevice.
- Move algorithm selection inside Unpinned class.
- Refactor function names.
- Use size_t for size threshholds.

Change-Id: Iac4de652ac9d49acbf527aa0849e388b8ecd8486


[ROCm/clr commit: e77d75c1c1]
2016-09-22 14:21:18 -05:00
Ben Sander 6b6b0d6b58 Updates docs for hipHcc* functions, move to header
[ROCm/clr commit: b4bc101c96]
2016-09-22 13:05:47 -05:00
Aditya Atluri 0862286458 Fixed typo in function return
Change-Id: I8905bfdbc162815ac10c926e77a9bab432932c9c


[ROCm/clr commit: c0babe6b0a]
2016-09-22 09:30:05 -05:00
Rahul Garg c121b8b535 Added hipRuntimeGetVersion function
Change-Id: I59ec2beacb5a94439deed0dcc8eb37d6de1cc900


[ROCm/clr commit: 86e441c769]
2016-09-22 15:21:23 +05:30
Rahul Garg 6d1d6b9cfb Added return error code hipErrorInvalidValue in hipMemGetInfo
Change-Id: If01b012136b655ff8eb4878eb703dfe3e6a36530


[ROCm/clr commit: 8842a0d5b8]
2016-09-17 23:54:20 +05:30
Maneesh Gupta d9488e163f Updates to doxygen documentation for HIP Event APIs
Change-Id: Ic2e4a5725aebca14ac824da43436aacd0fe0a45c


[ROCm/clr commit: b14d2c8c8e]
2016-09-16 15:06:54 +05:30
Rahul Garg de2c138bd7 Partial updates of error codes for Memory APIs
Change-Id: If924867cc62f56dc9eaf81f5499ba66f417c393a


[ROCm/clr commit: cb3bff0a0d]
2016-09-16 12:59:41 +05:30
Rahul Garg b16b1fdda8 Added further properties in hipChooseDevice
Change-Id: I8f7f5800e8a95873318a534f09e75e037ad31b06


[ROCm/clr commit: 6139d5f587]
2016-09-16 11:18:34 +05:30
Aditya Atluri 29a9549a47 added more error codes to hipErrorGetString
Change-Id: I80c675905d94813502040fd0caa07985fa8c7dcc


[ROCm/clr commit: 6cb5a13a2b]
2016-09-15 11:28:18 -05:00
Aditya Atluri 18756a8e91 added new error reporting case
Change-Id: I5f0a37dbe396412f5602d04df19d538e451c2696


[ROCm/clr commit: 2c12394d52]
2016-09-15 10:50:26 -05:00
Rahul Garg 75014fb837 Updated Doxygen related documentation for Error APIs
Change-Id: I16873503d8e96df91831e2a0503835a1ff0220e3


[ROCm/clr commit: c6808ddc0e]
2016-09-13 16:54:46 +05:30
Aditya Atluri 7373e61507 Added async memcpy driver api
Change-Id: I90e8a078d668a408e79f9e1142e7534771467a4f


[ROCm/clr commit: c3ab5a8df8]
2016-09-09 10:21:52 -05:00
Maneesh Gupta 905a3a2211 Remove redundant API hipDeviceGetFromId from HCC path
Change-Id: Id6b4f1374b12cb3949d725f0859425cd8de6d868


[ROCm/clr commit: 0c56f707f0]
2016-09-09 12:06:19 +05:30
Aditya Atluri a482dd2ae0 Added signal management which passes stress tests
Change-Id: I7e1660a8ca2c5ee580a91f76eae9a58ca49f0457


[ROCm/clr commit: 5845a2d8c6]
2016-09-08 14:52:51 -05:00
Rahul Garg 58ef4a1880 Removed return code related doxygen from hip_device src file
Change-Id: Iffe51b69dd6be064b7898d06e537a505e27edb0b


[ROCm/clr commit: 9ad1d2c39e]
2016-09-08 23:12:12 +05:30
Rahul Garg be1dd62dd7 Initial support for hipChooseDevice function
Change-Id: Iedbf5f98c96673ab701dd7539d80a77b994d296f


[ROCm/clr commit: 817bd7270f]
2016-09-08 22:37:24 +05:30
Ben Sander 70a3ad883c Adapt to _kernelSymbol
Change-Id: Idebb7d7e895286ce5423afdcf391e00fa8b2b94f


[ROCm/clr commit: 8022671a5e]
2016-09-07 15:48:40 -05:00
Ben Sander c75953a822 Add hipStreamQuery
Change-Id: Ib0813b1065feba4fe9ae861d24cfc6f9c5f580be


[ROCm/clr commit: fd67689114]
2016-09-07 15:18:34 -05:00
Ben Sander c5f7fd723a 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/clr commit: 745310399d]
2016-09-07 15:18:34 -05:00