Commit Graph

13222 Commits

Author SHA1 Message Date
Ben Sander 43e9932196 Fix av::copy in dialects to use capture-by-value
Change-Id: Ibce1488a1326f66b92b4d5b351230666b691ed31
2016-09-02 09:46:59 -05:00
Ben Sander 9a99000a62 Use create_blocking_marker for WaitEvent implementation
Change-Id: Ib3113f69a14e48b9fe0558d7b455148e478d8eed
2016-09-02 09:46:59 -05:00
Ben Sander 8a4900b679 improve debug for event
Change-Id: If6c0e25729d9964cbe5967833247a6d791d575a0
2016-09-02 09:46:59 -05:00
Ben Sander 02f65a483c Refactor for stream->_av.
- move _av into stream critical section.  ( HCC accelerator_view is not
  thread-safe but HIP steram is. )
- Refactored many places in code that need to acquire critical section.
some were previously thread races, ie enqueueing marker.

-remove support for GRID_LAUNCH_VERSION < 20
-Enable USE_AV_COPY based on HCC work-week.
- Review hipModule docs, some calrity/editing.

Change-Id: I3ce7c25ece048c3504f55ecd4683e506bb1fc8b6
2016-09-02 09:46:59 -05:00
Ben Sander 27b3706a72 enable hc_am example in hcc_ddialects example
Change-Id: Iec2f9eb05f95cb025c157fee8fd284aab844d1a2
2016-09-02 09:46:59 -05:00
Ben Sander 6a8ae733cc enable dynamic shared always
Change-Id: Idc246546f583a82489ef34d1fe22d0e118b1e0ed
2016-09-02 09:46:59 -05:00
Aditya Atluri 3fbe062008 added logger for return status
Change-Id: Ib93012a15b1cfa90714a6ebd5153cc40e28e6566
2016-09-02 09:44:00 -05:00
Aditya Atluri af86d28187 fixed code according to convention
Change-Id: Ib90c84a30ea6da3531e8b7c3e281dd4b31915198
2016-09-02 09:31:37 -05:00
Ben Sander bc489dd902 Documentation review and update
Change-Id: If40d096646014d70a198db3532758028abe6a93f
2016-09-02 09:15:49 -05:00
Evgeny Mankov 000f0f8114 [HIPIFY] CUDA Driver API porting to HIP : types are added.
CUdevice           -> hipDevice_t // Yet under discussion
CUdevice_attribute -> hipDeviceAttribute_t
CUdevprop          -> hipDeviceProp_t
CUfunction         -> hipFunction_t
CUfunc_cache       -> hipFuncCache
CUsharedconfig     -> hipSharedMemConfig
CUcontext          -> hipCtx_t
CUmodule           -> hipModule_t
CUevent            -> hipEvent_t
CUstream           -> hipStream_t
2016-09-02 16:31:46 +03:00
Rahul Garg 093569e611 Removed Doxygen return codes from source file
Change-Id: Iaf9f13df73a9c17c494c9ff67203b836ee90648d
2016-09-02 18:37:26 +05:30
Rahul Garg 302f6c1e3a Added hipDeviceTotalMem
Change-Id: I877fbc9e4767bbd70ecd0184f5123c9bc6cbd06f
2016-09-02 15:12:50 +05:30
Maneesh Gupta 672e8772a2 hip_base package: bundle cmake folder in package
Change-Id: I7f30469242a0357c68b9a27b7b18bbe1f1f15fc1
2016-09-02 15:09:05 +05:30
Maneesh Gupta 6396f07835 CMakeLists.txt: install cmake folder
Change-Id: I5367281c62529b4b832c77ea93e3994a5f9133f4
2016-09-02 15:08:36 +05:30
Maneesh Gupta de24b6d228 FindHIP: First version of re-implementation
Change-Id: I84332a0f7d89271bf9370dbcd19d893119e738f9
2016-09-02 15:07:33 +05:30
Rahul Garg 392860bf20 Added hipDeviceComputeCapability, hipDeviceGetPCIBusId and hipDeviceGetName
Change-Id: Ibe2d975df796712633900ddc7b0734ec2b8ab4ec
2016-09-02 14:45:53 +05:30
foreman 411cf8cc1d P4 to Git Change 1310134 by johtaylo@johtaylo-JTBUILDER03-increment on 2016/09/02 03:00:07
SWDEV-2 - Change OpenCL version number from 2214 to 2215.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#1961 edit
2016-09-02 03:05:01 -04:00
Rahul Garg 2b2ffaf599 Added hipDeviceGet function
Change-Id: I7c25bc24680589682af1b199072807523fc37f50
2016-09-02 12:25:50 +05:30
foreman 557d2bfddf P4 to Git Change 1310081 by lmoriche@lmoriche_opencl_dev on 2016/09/01 21:27:48
SWDEV-94610 - The spec says that the value returned for HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH does not include the NUL terminator. We should add one before using the string.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#25 edit
2016-09-01 21:34:31 -04:00
foreman 45eedbec7c P4 to Git Change 1310046 by gandryey@gera-w8 on 2016/09/01 18:43:53
SWDEV-101621 - [CQE OCL][OpenCL on PAL] 6 WF Conformance tests are failing
	- Fix fillimage with DEPTH16 format

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#9 edit
2016-09-01 18:50:31 -04:00
foreman b232b2bbab P4 to Git Change 1310033 by skudchad@skudchad_test_win_opencl2 on 2016/09/01 18:10:18
SWDEV-101383 - [RS_DVR][MGPU] Slave GPU is blocked from going into BACO when DVR process is active (no recording or instant replay)
	- if the OS is Win10, no need to do extensive adapter init.

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/11241/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#552 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#171 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#60 edit
2016-09-01 18:15:08 -04:00
foreman 09c96ae91c P4 to Git Change 1310014 by gandryey@gera-w8 on 2016/09/01 17:32:18
SWDEV-101621 - [CQE OCL][OpenCL on PAL] 6 WF Conformance tests are failing
	- Make sure the rowPitch is aligned to pixels for images created from buffer

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#10 edit
2016-09-01 17:44:19 -04:00
foreman 02a04ecb2c P4 to Git Change 1310000 by asalmanp@asalmanp-ocl-stg-pal on 2016/09/01 17:13:37
SWDEV-79278 - [OpenCL][PAL] force Vega10(gfx9)(aka: Greenland) to use PAL backend

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/11279/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#551 edit
2016-09-01 17:23:35 -04:00
Ben Sander af2dee92ab add hipStreamWaitEvent on nvcc 2016-09-01 13:28:27 -05:00
foreman 5787de6741 P4 to Git Change 1309875 by smekhano@stas-rampitec-hsa on 2016/09/01 14:11:31
SWDEV-101534 - Lexa bringup: correct capability to 8:0:4 and add complib code
	Testing: smoke, precheckin
	Reviewed by Brian Sumner and Evgeny Mankov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/gpu/scwrapper/SI/devStateSI.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#47 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#41 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#37 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#38 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#33 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#63 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#141 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#10 edit
2016-09-01 14:20:14 -04:00
pensun 4ed2035dd2 Modify hipMalloc to take size of 0 and return NULL pointer for it.
Modify hipMemoryAllocate test for this change.

Change-Id: I884aee0cd5fe0c60aebb4cb37cdbb4833c5bd0c7
2016-09-01 13:08:30 -05:00
foreman 57043d662d P4 to Git Change 1309866 by gandryey@gera-w8 on 2016/09/01 13:50:12
SWDEV-79445 - OCL generic changes and code clean-up
	- Improve image fill performance with multiple writes in a single thread. The current split has 3 regions

Affected files ...

... //depot/stg/opencl/drivers/opencl/library/common.hsa/src/blitKernels.cl#4 edit
... //depot/stg/opencl/drivers/opencl/library/common/src/blitKernels.cl#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#123 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.hpp#40 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.hpp#4 edit
2016-09-01 14:01:08 -04:00
foreman d6fbd59c1a P4 to Git Change 1309857 by lmoriche@lmoriche_opencl_dev on 2016/09/01 13:09:36
SWDEV-94610 - Restore the amdgpu_metadata.[ch]pp namespaces (amd::hsa::code)

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.hpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#12 edit
2016-09-01 13:18:08 -04:00
foreman ee978692f5 P4 to Git Change 1309815 by lmoriche@lmoriche_opencl_dev on 2016/09/01 11:55:16
SWDEV-94610 - Restore the amdgpu_metadata.[ch]pp files. We need to share these files between different projects, and should avoid branching them. Ideally, they would be part of a metadata utility library.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.cpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.hpp#1 branch
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmetadata.cpp#3 delete
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmetadata.hpp#4 delete
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#11 edit
2016-09-01 12:05:26 -04:00
Evgeny Mankov 22dca6794d [HIPIFY] CUDA Driver API porting to HIP : CUresult enum.
enum CUresult was merged with enum cudaError_t into single hipError_t.

Thus a majority of HIP error codes has a reflection to Driver's and RT's corresponding error code at the same time. For instance:
    cuda2hipRename["CUDA_SUCCESS"]                         = {"hipSuccess", CONV_ERR, API_DRIVER};
    cuda2hipRename["cudaSuccess"]                          = {"hipSuccess", CONV_ERR, API_RUNTIME};

There are a few CUDA return error codes which are RT or Driver specific. For instance:
    cuda2hipRename["CUDA_ERROR_INVALID_CONTEXT"]           = {"hipErrorInvalidContext", CONV_ERR, API_DRIVER};

    cuda2hipRename["cudaErrorInvalidMemcpyDirection"]      = {"hipErrorInvalidMemcpyDirection", CONV_ERR, API_RUNTIME};

Matchers were changed from "cuda.* | cublas.*" to "cu.*" as CUDA API functions/types starts with 'cu'.
2016-09-01 18:54:03 +03:00
Aditya Atluri f22fda1291 Fixed offline kernel compilation
1. Removed vcpy_isa.ptx as it should be generated during make
2. Made argument padding specific to hcc path
3. Renamed --gencodeobject to --genco
4. Changed Makefile to work on both nvcc and hcc path

Change-Id: Ifd053d541085d9ce4fd37bc21b07674786c7163e
2016-09-01 10:39:14 -05:00
Maneesh Gupta 0dbb0d0322 Merge branch 'amd-develop' into amd-master
Change-Id: I28abeb5f0c81dd0315dcb1c987f22704a9c0d18b
2016-09-01 16:06:42 +05:30
Maneesh Gupta b7b78d3b86 Fixed module_api/Makefile to set flags based on HIP_PLATFORM
Change-Id: I2fa9a556e0c4f25f4963ecef1d25eb922f9af1b9
2016-09-01 15:11:12 +05:30
Maneesh Gupta 1446ad3b92 Updates to gencodeobject generation logic
- hipcc honors HIPCC_VERBOSE for gencodeobject too
    - fixed gencodeobject generation logic for nvcc path
    - hipgenisa.sh is no longer passed the --gencodeobject flag

Change-Id: Iab83c18a6decef445fda8468ba5de10cd7935046
2016-09-01 15:06:36 +05:30
foreman 51b56820d8 P4 to Git Change 1309585 by johtaylo@johtaylo-JTBUILDER03-increment on 2016/09/01 03:00:07
SWDEV-2 - Change OpenCL version number from 2213 to 2214.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#1960 edit
2016-09-01 03:08:43 -04:00
Rahul Garg 25f3032328 Added doxygen documentation for hipCtxXXX APIs
Change-Id: Id9cf3491e9a8c78cb7bfeb9976c36d6fe565628f
2016-09-01 12:22:37 +05:30
Maneesh Gupta adcc0e32d2 hipgenisa.sh looks for hipcc relative to itself
Change-Id: Iac63fb5a87db1d735dbfa9697ce1f769a36b4d4a
2016-09-01 12:13:11 +05:30
Maneesh Gupta 9eeb6c31ae Fix typo in hipcc
Change-Id: I35817c08b503f438f412d4bfe84afc11b671dc77
2016-09-01 12:11:11 +05:30
Maneesh Gupta 7c24b08284 module_api/Makefile: Use gencodeobject instead of genisa
Change-Id: I7e3523810f5603ad727b1fda7ff2d0dc53ec72d7
2016-09-01 12:10:31 +05:30
Rahul Garg 8de15914ae Added context related difference note in hip_porting_driver_api.md
Change-Id: I5bd2884a16db51871baa7c19fa2bd63a0bd3adad
2016-09-01 11:35:42 +05:30
Rahul Garg a949060b12 Added HIP_INIT_API to hipDeviceSynchronize()
Change-Id: I9bd6bf206905621b17e1999994b5ea09b7382180
2016-09-01 11:00:30 +05:30
foreman 741816f873 P4 to Git Change 1309526 by lmoriche@lmoriche_opencl_dev on 2016/08/31 22:39:22
SWDEV-94610 - Use the metadata to set the correct size for pointer arguments. Pointers to different address spaces may be of different sizes.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#11 edit
2016-08-31 22:44:50 -04:00
Aditya Atluri 6cd10125e9 added device code offline compilation for nvcc
Change-Id: I1f77131778b4dcfcf720b4367dd9f18ffaf1cbb3
2016-08-31 20:36:36 -05:00
Aditya Atluri bcbf2973a3 corrected path to hipgenisa.sh and fixed its working
Change-Id: I140055d5e800cd4b23253171ba889db5e63b637b
2016-08-31 20:16:48 -05:00
foreman 8d309ccae6 P4 to Git Change 1309486 by lmoriche@lmoriche_opencl_dev on 2016/08/31 20:40:56
SWDEV-94610 - Fix the indentation and function declarations (coding standards).

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#13 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#10 edit
2016-08-31 20:46:12 -04:00
foreman 52e3652f92 P4 to Git Change 1309479 by lmoriche@lmoriche_opencl_dev on 2016/08/31 20:14:13
SWDEV-94610 - Fix the argName length issue. The string returned by the ROCR is already NUL-terminated.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#22 edit
2016-08-31 20:21:06 -04:00
foreman 29a3f5d56a P4 to Git Change 1309472 by lmoriche@lmoriche_opencl_dev on 2016/08/31 19:27:07
SWDEV-94610 - Fix the API::get_kernel_arg_info conformance test failure. The runtime metadata needs to return references from Name() and TypeName() instead of temporary strings. Name().c_str() should be valid until the program is destroyed.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmetadata.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmetadata.hpp#3 edit
2016-08-31 19:36:48 -04:00
foreman ed155ace2e P4 to Git Change 1309426 by lmoriche@lmoriche_opencl_dev on 2016/08/31 18:05:23
SWDEV-94610 - roundUp the kernarg segment size to the hidden arguments alignment (sizeof(size_t)). Fixes ocltst::oclperf::OCLPerfLDSReadSpeed.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#21 edit
2016-08-31 18:20:16 -04:00
foreman 07339a999b P4 to Git Change 1309300 by wchau@wchau_WIN_OCL_HSA on 2016/08/31 14:57:02
SWDEV-100272 - [OCL] Support AMD DVR Core functionalities - Distinct Single Display (Changes in OCL runtime)

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp#27 edit
2016-08-31 15:04:44 -04:00
Aditya Atluri 667ec7cbe2 added sample for how-to-use pre-compiled kernels1. Corrected the exit output of kernel compilation by hipcc
2. Added sample which loads/run kernel binary during runtime?

Change-Id: I26ccaca1f844fee317592e26c9e654ce548b96a8
2016-08-31 13:56:07 -05:00