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

37 Коммитов

Автор SHA1 Сообщение Дата
Maneesh Gupta 8d1ab4c21a Fix typo in comment
Change-Id: I217012e10d8e5322aa0dc7dd5915be10df35fb53
2016-09-16 15:18:17 +05:30
Aditya Atluri 7407cb2600 added more error codes to hipErrorGetString
Change-Id: I80c675905d94813502040fd0caa07985fa8c7dcc
2016-09-15 11:28:18 -05:00
Aditya Atluri e51ce8fc09 Added hipLaunchModuleKernel and new error codes
- hipLaunchModuleKernel maps to cuLaunchKernel
- Whole lot of new error codes added for the use of driver api
 - KernelParams arguments is not yet supported
 - hipLaunchModuleKernel is a synchronous api (will change eventually)
 - All the commands in a stream will wait on host when hipLaunchModuleKernel is called on it

Change-Id: Ib4a4fae1db06fbb3a81d5a5575b026aa821264ed
2016-08-18 11:26:55 -05:00
Rahul Garg 62d390da58 First implementation of hipCtxXXX functions
Change-Id: I4609cbe6bd90a1fff8655bff4fdd773864397aba
2016-08-13 00:09:08 +05:30
Ben Sander 2ab19ca505 NVCC improvements.
- Complete translation tables for cudaError <-> hipError_t.
- Remove some odd errors that were not correctly translated or not used.
- Add HIPCHECK_API to test infrastructure.  Used for negative testing
  an API ; if a mismatch occurs it shows the expected return error
  code.  Can also print a warning rather than error.
- Enable hipMemoryAllocate on NV system, and review error coded.
- Add hipErrorName to nvcc.

Change-Id: I680427dcf32a5796d5913cf9e7f3b4c6f6b91599

Conflicts:
	tests/src/CMakeLists.txt

Bug fixes and improved docs for hipFree and hipHostFree.

    - Passing NULL pointer initialized runtime and return hipSuccess
      (not an error like before).
    - add negative test for this. (hipMemoryAllocate, improved)
    - Match NVCC errors for invalid pointers, add to test.
    - Update hipFree and hipHostFree docs.
    - hipGetDevicePointer always set *devicePointer=NULL, even for
      invalid flags.
    - Gate shared memory usage on specific HCC work-week.

Change-Id: I533b4fd3280a3d6cdbf05eb768976f0c7506c012
2016-06-16 06:13:51 +05:30
Maneesh Gupta ffdf6ab23b Merge branch 'release_0.84.00' into privatestaging
Conflicts:
	include/hcc_detail/hip_runtime.h
	src/hip_hcc.cpp
2016-04-22 10:55:58 +05:30
Maneesh Gupta bc4f388b69 Prefix HIP includes with hip/ 2016-04-19 15:02:12 +05:30
Aditya Atluri 2e80de6dcb improved error returns for hipHostRegister/UnRegister functions 2016-04-15 10:42:31 -05:00
Ben Sander f2aa470f7f P2P checkpoint.
Maintain enabled peer tables for each device.
2016-04-11 07:58:58 -05:00
Aditya Atluri 496da0aabd C guarding the apis 2016-03-30 06:08:50 -05:00
Ben Sander 8635863724 Tweak thread-safe implementation.
introduce LockedAccessor option so destructor does not unlock.
Allows locks to exist across function boundaries, required
for hipLaunchKernel macro which has several unusual requirements.
(including C comppatibility, must use variadic macro, more).
2016-03-28 21:41:47 -05:00
Aditya Atluri 794007c3e8 Split files based on functionality and changed cmake file 2016-03-24 04:57:30 -05:00
Aditya Atluri 52cf63472c Revert "Revert "fixed memory free apis""
This reverts commit 287ba34aca.
2016-03-21 10:40:42 -05:00
Aditya Atluri 287ba34aca Revert "fixed memory free apis"
This reverts commit 96a1899df7.
2016-03-21 10:36:11 -05:00
Aditya Atluri 96a1899df7 fixed memory free apis 2016-03-21 10:32:30 -05:00
Ben Sander ab910efb96 hipHostRegister and hipHostMalloc refactor.
Note hipHostMalloc (not hipHostAlloc or hipMallocHost).
 -  the hipHost* is used for all HIP APIs dealing with Host memory.
    (including hipHostMalloc, hipHostFree, hipHostRegister,
hipHostUnregister, hipHostGetFlags, hipHostGetDevicePointer).
  - hipMallocHost is consistent with "hipMalloc" for allocating device
    memory.  Enumerations hipHostMalloc* also used as optional
    flags parm to hipHostMalloc.
2016-03-22 02:30:10 -05:00
Ben Sander cea37c3e91 Deprecate hipMallocHost and hipFreeHost.
These will print compiler warnings if used, so we can weed them out
before removing.

Also add a default flags args for hipHostAlloc, in the C++ functioin
headers.  So you can replace hipMallocHost(&ptr, size( with hipHostAlloc(&ptr, size)
2016-03-19 22:53:59 -05:00
Ben Sander e7586adb33 Refactor to isolate staging buffer code. 2016-03-17 00:20:56 -05:00
Aditya Atluri 4b271ec013 Added canMapHostMemory to hipDeviceProp 2016-03-05 19:30:29 -06:00
Ben Sander ff66ef0779 fixes for titan platform 2016-02-26 05:25:30 -06:00
Ben Sander c300ffe458 Merge branch 'privatestaging' of https://github.com/AMDComputeLibraries/HIP-privatestaging into privatestaging 2016-02-26 06:15:09 -06:00
Ben Sander 4adab7b7ef Merge branch 'memtracker' into privatestaging
Conflicts:
	src/hip_hcc.cpp
2016-02-25 19:38:46 -06:00
Evgeny Mankov 57e212606d Attribute hipDeviceAttributeIsMultiGpuBoard for obtaining Device property isMultiGpuBoard is added.
On HIP path property obtaining done through hsa_iterate_agents and counting the devices of HSA_DEVICE_TYPE_GPU type.

P.S.
On multi-boards systems it might be problems with detection what board a GPU plugged into (not tested).
2016-02-25 23:44:39 +03:00
Evgeny Mankov 833c9e52ad Guard #ifdef USE_ROCR_20 is added for ROCR_20 device properties (memoryClockRate, memoryBusWidth)
By default isn't defined.
To add ROCR_20 support HIP have to be compiled as follows: make CXX_DEFINES+=-DUSE_ROCR_20
2016-02-19 13:27:03 +03:00
Evgeny Mankov 1c19dbb807 Device property memoryBusWidth implementation.
+ Device property memoryBusWidth is added to hipDeviceProp_t struct.
+ Device attribute hipDeviceAttributeMemoryBusWidth is added to hipDeviceAttribute_t struct.
+ Tests update.
2016-02-18 18:15:01 +03:00
Evgeny Mankov 5ea8543d2e Device property memoryClockRate implementation.
+ Device property memoryClockRate is added to hipDeviceProp_t struct.
+ Device attribute hipDeviceAttributeMemoryClockRate is added to hipDeviceAttribute_t struct.
+ Tests update.
+ Rename hipDevAttrConcurrentKernels to hipDeviceAttributeConcurrentKernels.
2016-02-18 17:25:28 +03:00
Evgeny Mankov 2b6fda77ca Attribute hipDevAttrConcurrentKernels for obtaining Device property concurrentKernels is added. 2016-02-18 14:34:18 +03:00
Ben Sander caef9b5ced Add per-stream pool for hsa_signals. 2016-02-16 01:59:13 -06:00
Ben Sander 4ee2a5229b Create address tracker for am_alloc.
Tracks device where memory is allocated, pinned-host or device, and
more.

Uses memory-range-based lookups - so pointers that exist anywhere in

the range of hostPtr + size will find the associated AmPointerInfo.

The insertions and lookups use a self-balancing binary tree and
should support O(logN) lookup speed.
2016-02-12 18:24:08 -06:00
Evgeny Mankov ea8f99702d Fix typo: maxThreadsPerMultiProcessor -> MaxSharedMemoryPerMultiprocessor
Device property MaxSharedMemoryPerMultiprocessor set equal to totalGlobalMem (HIP path).
Reason: MaxSharedMemoryPerMultiprocessor should be as the same as group memory size. Group memory will not be paged out, so, the physical memory size = total shared memory size = group region size. NVCC path remains untouched: CUDA's device property MaxSharedMemoryPerMultiprocessor is reported.

hipify is updated as well.
2016-02-12 01:29:20 +03:00
Evgeny Mankov 33f60c300d BDFID (BusID/DeviceID/FunctionID) support.
Except FunctionID (or DomainID in CUDA) support, because cudaDeviceProp::pciDomainID is not reported by CUDA.
2016-02-11 22:26:01 +03:00
Evgeny Mankov 254da4ec53 Formatting, no functional changes 2016-02-10 17:21:18 +03:00
Evgeny Mankov 950c3baacd Device property concurrentKernels is added to hipDeviceProp_t struct.
For HCC path concurrentKernels is set to true since all ROCR hardware supports this feature.
For NVCC path concurrentKernels is obtained from CUDA's device property cudaDeviceProp::concurrentKernels.
2016-02-09 17:10:35 +03:00
Ben Sander 9e2c3c8df3 minor doc touchup 2016-02-08 22:11:11 -06:00
Sam Kolton 0a27507208 Implementation of hipDeviceGetAttribute() 2016-02-04 17:39:27 +03:00
sunway513 02fa107967 Fix some typos and incorrect namings in comments 2016-01-28 13:17:44 -06:00
Ben Sander f38e63ff18 Initial commit for GPUOpen Launch 2016-01-26 20:14:33 -06:00