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
此提交包含在:
Ben Sander
2016-06-10 20:12:46 -05:00
提交者 Maneesh Gupta
父節點 7cb45e2d87
當前提交 2ab19ca505
共有 9 個檔案被更改,包括 120 行新增53 行删除
+13
查看文件
@@ -27,6 +27,12 @@ THE SOFTWARE.
using namespace hc::precise_math;
#endif
#if __hcc_workweek__ > 16186
#define USE_DYNAMIC_SHARED 1
#else
#define USE_DYNAMIC_SHARED 0
#endif
#define HIP_SQRT_2 1.41421356237
#define __hip_erfinva3 -0.140543331
@@ -606,6 +612,11 @@ __device__ float __hip_y1f(float x)
return ret;
}
#if __hcc_workweek__ > 16186
#define USE_DYNAMIC_SHARED 1
#else
#define USE_DYNAMIC_SHARED 0
#endif
__device__ float acosf(float x)
{
@@ -1634,10 +1645,12 @@ __host__ __device__ int max(int arg1, int arg2)
return (int)(hc::precise_math::fmax((float)arg1, (float)arg2));
}
#if USE_DYNAMIC_SHARED
__device__ __attribute__((address_space(3))) void* __get_dynamicgroupbaseptr()
{
return hc::get_dynamic_group_segment_base_pointer();
}
#endif