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
This commit is contained in:
committed by
Maneesh Gupta
parent
7cb45e2d87
commit
2ab19ca505
@@ -764,28 +764,32 @@ hipError_t hipHostUnregister(void* hostPtr) ;
|
||||
/**
|
||||
* @brief Free memory allocated by the hcc hip memory allocation API.
|
||||
* This API performs an implicit hipDeviceSynchronize() call.
|
||||
* If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.
|
||||
*
|
||||
* @param[in] ptr Pointer to memory to be freed
|
||||
* @return #hipSuccess, #hipErrorMemoryFree
|
||||
* @return #hipSuccess
|
||||
* @return #hipErrorInvalidDevicePointer (if pointer is invalid, including host pointers allocated with hipHostMalloc)
|
||||
*/
|
||||
hipError_t hipFree(void* ptr);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Free memory allocated by the hcc hip host memory allocation API
|
||||
* @brief Free memory allocated by the hcc hip host memory allocation API. [Deprecated.]
|
||||
*
|
||||
* @param[in] ptr Pointer to memory to be freed
|
||||
* @return #hipSuccess, #hipErrorMemoryFree
|
||||
* @see hipHostFree
|
||||
*/
|
||||
hipError_t hipFreeHost(void* ptr) __attribute__((deprecated("use hipHostFree instead"))) ;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Free memory allocated by the hcc hip host memory allocation API
|
||||
* This API performs an implicit hipDeviceSynchronize() call.
|
||||
* If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.
|
||||
*
|
||||
* @param[in] ptr Pointer to memory to be freed
|
||||
* @return #hipSuccess, #hipErrorMemoryFree
|
||||
* @return #hipSuccess,
|
||||
* #hipErrorInvalidValue (if pointer is invalid, including device pointers allocated with hipMalloc)
|
||||
*/
|
||||
hipError_t hipHostFree(void* ptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user