Commit Graph

74 Commits

Author SHA1 Message Date
Evgeny 96b7f0404e renaming HIP_INIT_CB_API to HIP_INIT_API
[ROCm/clr commit: e362688adf]
2018-11-13 15:33:26 +00:00
Evgeny 7519b3f75e adding activity prof layer
[ROCm/clr commit: 084a68be63]
2018-11-13 15:33:26 +00:00
Yaxun Sam Liu 9a4744566f Support malloc/free for hip-clang
[ROCm/clr commit: d17dc21c9c]
2018-07-27 16:24:51 -04:00
Rahul Garg 065f0d8d8c Add integrated device property
[ROCm/clr commit: 94f086e9cd]
2018-06-02 13:11:16 +05:30
Maneesh Gupta 46ddefedee Apply .clangformat to all repo source files
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344


[ROCm/clr commit: 9e47fccc89]
2018-03-12 11:29:03 +05:30
Ben Sander cabf4d817c Fix some cppcheck style issues.
[ROCm/clr commit: 5933ca7300]
2017-12-01 20:45:34 +00:00
Ben Sander 4df6b371ab 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.


[ROCm/clr commit: dc7d993a02]
2017-10-30 20:20:51 +00:00
Rahul Garg 7c51575223 Device count check on input device id
[ROCm/clr commit: 04a5a36ef7]
2017-08-22 14:05:44 +05:30
Ben Sander 967ca1a44e Add some new HIP_TRACE_API options.
[ROCm/clr commit: d6aee9ad8f]
2017-08-16 04:00:33 +00:00
Rahul Garg 687fac97dc Updated context management logic:
1) hipSetDevice sets a flag so that next call to hipCtxGetCurrent returns primary context on current device
2) hipCtxGetCurrent returns primary context on current device if TLS context stack is empty
3) hipCtxPopCurrent falls back to primary context on current device as default
4) hipCtxPushCurrent, hipCtxSetCurrent and hipCtxCreate reset the flag set in hipSetDevice


[ROCm/clr commit: c4e9323877]
2017-08-08 07:02:22 +05:30
Ben Sander 6079b4b4f6 Some fixes to tracing.
[ROCm/clr commit: 9e9f384899]
2017-07-28 22:13:43 -05:00
Ben Sander 235b60165f Make host memory allocations coherent by default.
Associated change is to optimize event recording so it uses
agent-scope releaes (since it was only using system-scope release
to support non-coherent host mem).

Flags and environment variables exist to obtain previous behavior
if desired.  Options are documented in new performance guide.


[ROCm/clr commit: 6576201ec2]
2017-07-26 19:20:34 -05:00
Rahul Garg ce0833f3bb Fixed build error in hipDeviceGetByPCIBusId
Change-Id: I33be362910c4c5dca7435fb9c41f427b54f0e9a7


[ROCm/clr commit: cbc98cc098]
2017-07-01 07:56:30 +05:30
Rahul Garg 1be7dc7cc2 Fixed hipDeviceGetByPCIBusId
Change-Id: Ia36bb9425671ef7659541c9aeedae4098456a31b


[ROCm/clr commit: 467a2ba014]
2017-06-30 10:11:41 +05:30
Rahul Garg 1ff995a92a Fixed hipDeviceGetPCIBusId for HIP/HCC
Change-Id: I3688fa2476e1baada2d3c5fc3735cec3f15a1e21


[ROCm/clr commit: a7c727f352]
2017-06-28 23:48:27 +05:30
Rahul Garg 52af9a3cf3 Arguments validation in hipDeviceGetPCIBusId
Change-Id: I89770517c3ac94e4bf476344d27c18f03cfcde08


[ROCm/clr commit: 3f25611692]
2017-06-15 00:21:47 +05:30
Rahul Garg f48cbf564a Input args NULL check in hipChooseDevice
Change-Id: I1a7b8cded2f81d739645bbf3dab2f04bb9c3c796


[ROCm/clr commit: 0efd737767]
2017-06-13 13:35:50 +05:30
Ben Sander 4ac6ac9d1d 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/clr commit: 8bc6ee5932]
2017-05-16 19:04:25 -05:00
Aditya Atluri 6dccc18fa0 fixed hipFuncSetCacheConfig on rocm path
Change-Id: I937a3afbf115edc94a753a0beb2230ed60a6f021


[ROCm/clr commit: 208bdbbcbb]
2017-04-28 11:53:11 -05:00
Aditya Atluri 3651cb672a added new api hipHccModuleLaunchKernel
1. hipHccModuleLaunchKernel is same as hipModuleLaunchKernel with OpenCL workitem model
2. Added copy right
3. Fixed header naming

Change-Id: I6a7c35a3566e2f8d3f5056613e34193775d4b236


[ROCm/clr commit: 1cead6a4cd]
2017-03-31 12:11:34 -05:00
Rahul Garg b4d190a445 Context management related changes in HIP.
-
-Contexts across threads are listed under device
-Device reset cleans up all contexts and re-initializes _primaryCtx

Change-Id: Ie1cfbb26d43a8dc6869be3e6ebaf7344ce374643


[ROCm/clr commit: c837b8d713]
2017-02-27 15:24:17 +05:30
Ben Sander 1ff12d95a6 Log error with ihipLogError. Cleans up CXL trace display.
[ROCm/clr commit: d19c4767b7]
2017-01-23 22:34:41 -06:00
Ben Sander 7a992b9fc3 Change ihipDeviceSetState,ihipDevice* so it doesn't log error
Cleans up debug trace.


[ROCm/clr commit: 6de88d4293]
2017-01-19 23:55:24 -06:00
Aditya Atluri a86633f210 changed copyright year from 2016 to 2017 in src directory
Change-Id: Idb97db509b2b4b1656b2df7a14a62ade38c9d574


[ROCm/clr commit: e9ff23e5f9]
2017-01-11 18:05:41 -06:00
Rahul Garg 0aabd435a9 Added state for hipDevice.
Change-Id: Idbc3c04cd054a01b634856a1e0a23ff172e991aa


[ROCm/clr commit: 090eadd0bd]
2017-01-09 23:54:01 +05:30
Rahul Garg 8acb6a623d Mapped hipDevice_t to int
Change-Id: I6cfa56c42b7cd04aa0e0bce510c0d72d34ea211a


[ROCm/clr commit: bddaa0e81c]
2016-12-17 16:53:03 +05:30
Rahul Garg f45c6facf0 Fixed build error due to GetPCIBusId overloaded function
Change-Id: I626446f2c72c8143f08c95367bc1c528abeaf69d


[ROCm/clr commit: a6b2f9c3a0]
2016-12-08 14:35:58 +05:30
Rahul Garg 89490a8065 hipDeviceGetPCIBusId int version changes for CUDA runtime API
Change-Id: I4d3b995f1d1ac83415ca84808a074e5c8cd72f3c


[ROCm/clr commit: d8fdd6c6fc]
2016-12-07 12:12:40 +05:30
pensun e885147485 change hipgetPCIID to take int as third parameter
Change-Id: I4429b36756a6d868a769abd783bf28a55147c0d0


[ROCm/clr commit: 8fcae3acc0]
2016-12-06 14:24:09 -06:00
pensun aaecc3fe04 local changes for hipnccl
Change-Id: I05a1f0381ce2914a800f573342cc954eb5ff82d9


[ROCm/clr commit: 808e555247]
2016-12-06 14:22:02 -06:00
Rahul Garg 8a210f721d Build Error correction in hipDeviceGetPCIBusId
Change-Id: I50ff4d95b7a732924c7a991cba60400b1c93c0de


[ROCm/clr commit: a019f1ce39]
2016-12-06 17:09:21 +05:30
Rahul Garg 48e9aaf696 Changed hipDeviceGetPCIBusId to return Bus ID as string
Change-Id: I6d5aa7362084109d34bc015d948f8723b2a38ee9


[ROCm/clr commit: 0017419521]
2016-12-06 16:55:17 +05:30
Maneesh Gupta b01694f524 Don't share g_malloc_heap_size between libraries
Change-Id: Ic70bf83d4f865bc5c453941fdbc1814c77f0ad9d


[ROCm/clr commit: ac368cc60f]
2016-12-05 11:03:45 +05:30
pensun b4b8de3cd7 Change the parameter type of hipDeviceGetPCIBusID to char*
Change-Id: Ia72f403126e95f65da53208fc246f45d1417381f


[ROCm/clr commit: 8e2980c7ef]
2016-11-28 10:47:18 -06:00
Rahul Garg cc61f4a720 Removed nested HIP calls from hip_device functions
Change-Id: I18785b0ee27e32fb8950982fa5c3a64d1ae6a9b8


[ROCm/clr commit: 8a2685e6cd]
2016-11-23 18:37:06 +05:30
Aditya Atluri b8b1459a64 added fast math APIs
1. Added fast math apis for sin, cos, tan, sincos
2. Added test for trig math functions
3. Added logarithm fast math
4. Changed how hipGetDevice, hipDeviceGetCacheConfig emit errors

Change-Id: Ie6ab594ddd5853cbe85e39a2f6d3479a807fa323


[ROCm/clr commit: 1a85762f53]
2016-11-22 10:20:09 -06:00
Aditya Atluri 66bd811c0d fixed error output for hipDeviceGetAttribute
Change-Id: I1e343a4e4e20e1a550d419f701cc1e60e9d03af4


[ROCm/clr commit: 912426716b]
2016-11-21 18:07:01 -06:00
Aditya Atluri 59c423b36a fixed compilation bugs
1. Texture functions are now compiling fine
2. Fixed hipFuncCache to hipFuncCache_t

Change-Id: I8f815887e4de43ee115bbaff249905b236541c39


[ROCm/clr commit: 2611de2477]
2016-11-21 08:56:30 -06:00
Aditya Atluri df27127960 Fixed hipDeviceGetCacheConfig on nvcc path
1. Changed test macro to emit line numbers
2. Added getcacheconfig api test for nvcc path
3. Fixed hipFuncCache_t data type

TODO: With this commit, right now there are 2 func cache datatypes
a. hipFuncCache_t for runtime API
b. hipFuncCache for driver API

Map these to a single data type

Change-Id: Ia47c9f5d7c2633638051bf17b1103048a1ede973


[ROCm/clr commit: b3c16ea7b5]
2016-11-20 12:18:08 -06:00
Rahul Garg 5040e8bcc3 Added hipDeviceGetByPCIBusId in hip/hcc path
Change-Id: I3cca0dc533d0281689d8a407c7da16ca1ba6a3a8


[ROCm/clr commit: 81c91f5b0b]
2016-11-01 10:57:48 +05:30
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 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
Aditya Atluri 2829a64391 changed hipLimit to hipLimit_t and data type to enum
Change-Id: I94f408cdcac4b0bb38801d58709b68e9630d44d0


[ROCm/clr commit: 34ab2a55ab]
2016-10-13 15:13:11 -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
Maneesh Gupta 46feb7dcf2 Move include/* to include/hip/*
Change-Id: I7a7b2839b4df59c7a4c503550f99fdc9e45c0f54


[ROCm/clr commit: bbfc08f419]
2016-10-04 22:17:18 +05:30
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