Commit Graph

519 Commits

Author SHA1 Message Date
foreman 80fed67799 P4 to Git Change 1210662 by rili@rili_opencl_stg on 2015/11/12 15:16:48
SWDEV-80061 - Copy flag HostMemoryDirectAccess from parent to view

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#124 edit


[ROCm/clr commit: 64a7c5df25]
2015-11-12 15:31:34 -05:00
foreman 96e9f89169 P4 to Git Change 1210047 by wchau@wchau_WINDOWS7_OCL on 2015/11/11 13:06:48
SWDEV-80450 - Fix the issue of app context reference count > 0 after app termination by using device context for the mapped buffer/image resource.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#155 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#123 edit


[ROCm/clr commit: 7237cf514f]
2015-11-11 13:14:27 -05:00
foreman 4f9ee0a967 P4 to Git Change 1209566 by smekhano@stas-nova-hsa on 2015/11/10 14:25:56
SWDEV-80874 - fixed out of bound access to the printf format string
	We do not really need two separate induction variables, pos and i, and we had a bug of not incrementing i as needed.
	The only reason it used to work is because all strings we used for testing ended with '\n'.
	The bug resulted in ignoring this '\n', but the code unconditionally adds '\n', so nobody noticed.
	If you try to print anything having any other escape, '\n' not at the end, or a colon, there will be assertion.

	That is fixed, and newline now is only added if last symbol in user's format was not newline, because otherwise
	we would now print 2 new lines. NB, I prefer to use bool variable rather then addressing last symbol of the string
	which could be empty.

	A side node, why do we run flex scanner past the last colon? If we do not we would not need this double encoding at all.

	Testing: smoke, precheckin, conformance printf with HSAIL forced, custom test
	Reviewed by German Andreev

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#309 edit


[ROCm/clr commit: eea9bc6733]
2015-11-10 14:33:05 -05:00
foreman 2adfd0343a P4 to Git Change 1209406 by emankov@em-hsa-amd on 2015/11/10 08:12:09
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Fix regression by CL 1208929 in blit compilation.

	[Regression]
	CL 1208929 causes the following OpenCL Sanity Lnx/Win7/Win8.1 32-bit tests on CI+ GPU (Kalindi, Bonaire, Hawaii):
	BufferBandwidth, CplusplusWrapper, DynamicOpenCLDetection, ImageBandwidth, KernelLaunch
	crashes with:
	:2:..\..\..\gpucompiler.cpp:441: aclCompile failed :
	:1:..\..\..\gpudevice.cpp:955: Couldn't create blit kernels!

	[Testing]
	OCL SDK 2.9 (32bit/64bit), pre-checkin:
	http://ocltc.amd.com:8111/viewModification.html?modId=62012&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#535 edit


[ROCm/clr commit: 8c29379c3f]
2015-11-10 08:17:59 -05:00
foreman 105a113d85 P4 to Git Change 1208929 by emankov@em-hsa-amd on 2015/11/09 10:49:06
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Integrate new algorithm for device program choice.

	[Reasons]
	1. Make the switching change as less as possible.
	2. Give a chance to test HSA_foundation device work on OCL 1.2 beforehand (asked by Nikolay).

	Almost already reviewed:
	http://ocltc.amd.com/reviews/r/8850/

	Additionally:
	1. Linking logic was changed: if the target of one of the binaries is hsail-(64) linking goes through HSAIL, otherwise - through AMDIL. Previously -cl-std=CL2.0 in any of the linking binaries was a criterion for HSAIL, what will be wrong for HSAIL 1.2 after switching. -clang & -edg options are set now to distinguish the path while linking.
	2. -cl-std=CL2.0 as a criterion for HSAIL was returned back in isHSAILProgram() method; -clang & -edg options were also added as a criterion.

	[ToDo] After enabling HSAIL by default remove -cl-std, -clang & -edg checks from the code.

	[Testing] Pre-checkin
	http://ocltc.amd.com:8111/viewModification.html?modId=61929&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

	[Reviewers] German Andryeyev, Nikolay Haustov

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_program.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#279 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#93 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#261 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#534 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#154 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#47 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#76 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#38 edit


[ROCm/clr commit: 539fef47eb]
2015-11-09 10:56:13 -05:00
foreman 7abec5d9e5 P4 to Git Change 1208925 by wchau@wchau_WINDOWS7_OCL on 2015/11/09 10:34:19
SWDEV-79957 - use system memory to calculate the largest available memory size on Linux APU system.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#533 edit


[ROCm/clr commit: 6f0457c510]
2015-11-09 10:40:09 -05:00
foreman 1ba573af22 P4 to Git Change 1208618 by skudchad@skudchad_test_win_opencl2 on 2015/11/06 17:27:01
SWDEV-77172 - IOMMUv2 changes for Windows 10
	- Clear passing SVM flag from top level and fix GL interop on SVM
	- Add\Remove gpuvmOffset before WDDM calls as its added manually for SUA model

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

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#230 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp#25 edit


[ROCm/clr commit: b0b6b55051]
2015-11-06 17:35:18 -05:00
foreman 2d0ee10d7b P4 to Git Change 1208596 by smekhano@stas-rampitec-hsa on 2015/11/06 16:26:28
SWDEV-80874 - fixed staging buffer overflow with HSA printf

	Staging buffer is ~2 times smaller than allocated printf buffer, so if amount of data in printf buffer exceeds the size of the staging buffer
	we hit assertion in the memory copy. To hit the assertion that is enough to print 2 integers with 64K workitems.
	Added loop to read printf buffer into staging in portions.

	Testing: smoke, precheckin, conformance printf with HSAIL forced, custom tests
	Reviewed by German Andreev

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#41 edit


[ROCm/clr commit: e18cd1d76e]
2015-11-06 16:37:38 -05:00
foreman 0d20de6e7a P4 to Git Change 1208448 by smekhano@stas-rampitec-hsa on 2015/11/06 12:02:54
SWDEV-80874 - Fixed ORCA RT HSA printf buffer indexing issues

	The format of the buffer is: printf_id, <arg1>, <arg2>, ...
	The RT did not advance index for printf_id field, so for example for a format string "%d" we have been printing printf_id instead of actual argument for every other string.
	The other issue is that outputDbgBuffer is adjusting its last argument (idx) by the number of consumed DWORD values,
	but PrintfDbgHSA::output() is also ajusting dbgBufferPtr, so we had adjustment done twice, printing only half of the actual data and then printing zeroes from the buffer.
	The resolution for both is to always pass 1 as index to outputDbgBuffer(). 1 because 0 is printf_id.

	Testing: smoke, precheckin, conformance printf with HSAIL forced, custom tests
	Reviewed by Brian Sumner and German Andreev

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#40 edit


[ROCm/clr commit: 047f87bb4f]
2015-11-06 12:20:00 -05:00
foreman d8942b2e37 P4 to Git Change 1208096 by ashi1@ashi1_win50 on 2015/11/05 18:20:58
SWDEV-80864 - HSAIL Metadata Workgroup Size Hint and Vec Type Hint added to HSAIL Runtime

	Runtime changes required for the use of these two metadata:
	  - Runtime's gpukernel.cpp requires new aclQueries during HSAILKernel::Init
	    - One for quering WorkGroupSizeHint's array
	    - Two for size of VecTypeHint and fetching VecTypeHint's string
	  - initArgList needs to be moved to end of HSAILKernel::init to allow createSignature to get non empty values
	  - Compiler lib's workgroup hint (wsh) needs to match runtime's type (size_t)
	  - In Kernel constructor, instead of using memset which corrupts std::string, specifically set default workGroupInfo struct's variables

	Also fixed wavesPerSimdHint to use size_t to match runtime.
	Updated CLAssumptionCheck.cpp since aclMetadata structure was modified.

	Note: This is the runtime counterpart to submitted CL#1204512. (Post Review#8808, SWDEV-79695)

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/include/v0_8/aclStructs.h#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclStructs.h#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#260 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#308 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLAssumptionCheck.cpp#48 edit


[ROCm/clr commit: b9fcb50bbc]
2015-11-05 18:28:26 -05:00
foreman b1328d9af2 P4 to Git Change 1207850 by emankov@em-hsa-amd on 2015/11/05 06:54:22
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Restore setBinary while linking GPU program.

	After CL 1205315 "Call aclLink always even for single library/binary." setting OCL Binary should work without setting library type for the program by setType(TYPE_LIBRARY).

	[Testing] pre check-in
	http://ocltc.amd.com:8111/viewModification.html?modId=61694&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

	[Reviewer] German Andryeyev
	http://ocltc.amd.com/reviews/r/8850

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#214 edit


[ROCm/clr commit: 3e4332a85f]
2015-11-05 07:02:25 -05:00
foreman 3af1c540ef P4 to Git Change 1207590 by xcui@merged_opencl_jxcwin on 2015/11/04 16:20:09
SWDEV-80174 - added an env variable OCL_SET_SVM_SIZE to change the SVM size of the device, if it support SVM. This is part of implemenation to change SVM size based on system memory size and device memory size.
	This is the changes in OpenCL  side.

	code review:
	http://ocltc.amd.com/reviews/r/8893/

	precheckin:
	http://ocltc.amd.com:8111/viewModification.html?modId=61653&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#149 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#246 edit


[ROCm/clr commit: 8a82228927]
2015-11-04 17:14:47 -05:00
foreman 8fa8db44ae P4 to Git Change 1206990 by bdhanase@opencl_intel5 on 2015/11/03 15:09:06
SWDEV-78103 - Remove the extra flush from WriteMarker call.

	Reviewed by: German

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#389 edit


[ROCm/clr commit: 0617e4e208]
2015-11-03 15:15:39 -05:00
foreman f1af7f3bb0 P4 to Git Change 1206500 by gandryey@gera-w8 on 2015/11/02 13:07:17
SWDEV-56468 - Support wave limiter in HSAIL path
	- Fix uninitialized variable

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#307 edit


[ROCm/clr commit: 66417ec305]
2015-11-02 13:17:02 -05:00
foreman 1eb0846b70 P4 to Git Change 1206247 by todli@todli-win-opencl-kv1 on 2015/11/01 04:30:43
SWDEV-77307 - OpenCL Stoney BU change: put real name on mainline

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil64.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail64.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#36 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#31 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#28 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/AMDILSubtarget.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/Internal/InternalProcessors.td#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#57 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#130 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp#30 edit


[ROCm/clr commit: b85a57a4ae]
2015-11-01 04:35:29 -05:00
foreman e4376a5ecd P4 to Git Change 1205907 by jatang@jatang-opencl-hsa-stg1 on 2015/10/30 09:46:25
SWDEV-56468 - Support wave limiter in HSAIL path - Resubmit 1200206.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#306 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#123 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#388 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.hpp#8 edit


[ROCm/clr commit: 3fd32966b0]
2015-10-30 09:58:26 -04:00
foreman 1b8fb20b6b P4 to Git Change 1205457 by emankov@em-hsa-amd on 2015/10/29 12:03:44
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Call aclLink always even for single library/binary.

	[Reason]
	If the binary is linked with an option -create-library & actually without any other modules to link, the binary is not changed except the ELF type, which should be ET_DYN according to OpenCL spec. Setting this ELF type did not perform previously, because aclLink was not called in case of single binary.
	After switching to HSAIL by default program_binary_type from conformance/compiler test (at least, but may be some others) would fail.

	aclLink correctly handles situations with no libs to link, and correctly sets the corresponding ELF type for the "linked" binary.

	[Testing] pre check-in

	[Reviewer] German Andryeyev
	http://ocltc.amd.com/reviews/r/8845/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#213 edit


[ROCm/clr commit: 68fd364e19]
2015-10-29 12:21:02 -04:00
foreman 3b942d7e0e P4 to Git Change 1205056 by gandryey@gera-w8 on 2015/10/28 17:13:54
SWDEV-78467 - OpenCL LiquidFlash feature
	- Add WriteBufferFromFile command

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#189 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#259 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#333 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#72 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#79 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#93 edit
... //depot/stg/opencl/drivers/opencl/runtime/runtimedefs#35 edit


[ROCm/clr commit: 715cbfd662]
2015-10-28 17:25:52 -04:00
foreman f3dd07c517 P4 to Git Change 1203838 by emankov@em-hsa-amd on 2015/10/26 11:43:45
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Error handling for parseAllOptions.

	[Testing] pre check-in

	[Reviewer] German Andryeyev
	http://ocltc.amd.com/reviews/r/8800/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#188 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#212 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsaprogram.cpp#21 edit


[ROCm/clr commit: d8de9d4adc]
2015-10-26 12:03:20 -04:00
foreman f41340272e P4 to Git Change 1202371 by mbareghe@mbareghe_stg_win30 on 2015/10/21 18:22:36
SWDEV-79399 - OpenCL printf does not print correctly when the printf builtin function is called twice - clear the local printf info each time

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#305 edit


[ROCm/clr commit: 6800b9f003]
2015-10-21 18:35:09 -04:00
foreman 4870c8d7b7 P4 to Git Change 1202323 by xcui@merged_opencl_jxcwin on 2015/10/21 17:01:58
SWDEV-79347 - added a env variable to change the size of the minimum system memory requirement to avoid downgrade OCL support. The default is 2, which means 2GB

	code review:
	http://ocltc.amd.com/reviews/r/8754/

	precheckin:
	http://ocltc.amd.com:8111/viewModification.html?modId=60516&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#278 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#532 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#243 edit


[ROCm/clr commit: 0bb91b89ba]
2015-10-21 17:35:18 -04:00
foreman 1508bce03f P4 to Git Change 1202262 by asalmanp@asalmanp-opencl-stg on 2015/10/21 15:36:48
SWDEV-79278 - [OpenCL][Baffin/Ellesmere BU] Exposing Baffin and Ellesmere for bring-up with dummy names. The real device names will be exposed later.
	ReviewBoardURL = http://ocltc.amd.com/reviews/r/8752/

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil64.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail64.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#35 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#30 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#26 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#129 edit


[ROCm/clr commit: 71585bb8cc]
2015-10-21 15:49:55 -04:00
foreman 21014b2703 P4 to Git Change 1201783 by gandryey@gera-w8 on 2015/10/20 18:03:34
SWDEV-79151 - clenqueuereadImage is slow when using a pinned buffer and a row_picth!0
	- Add a check if the provided rowPitch is equal to the actual transfer width. SDMA doesn't support row/slice pitches, thus runtime still has to fall back to compute in other cases

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#120 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#122 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#92 edit


[ROCm/clr commit: 922e14c46d]
2015-10-20 18:37:35 -04:00
foreman ca83b79cff P4 to Git Change 1201765 by rili@rili_opencl_stg on 2015/10/20 17:48:08
SWDEV-79077 - Disable >4GB large single allocation for SI because SI is using AMDIL path which doesn't not support 64bits NDRange yet.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#332 edit


[ROCm/clr commit: b817bb5898]
2015-10-20 18:31:32 -04:00
foreman c39ed65e6e P4 to Git Change 1201593 by kzhuravl@linu-kzhuravl-oclhsa on 2015/10/20 13:37:07
SWDEV-76911 - Boltzmann loader support

	[Loader]
	  - Introduce Context::SegmentFreeze
	    - Called by loader once executable is being frozen
	    - [HRT] Causes memory transfer to appropriate system or local memory
	    - [ORT] Does nothing
	  - Change loading of kernel symbol to read values from the code object
	  - Change debugger backdoor initialization to use Context::SegmentCopy

	[HSA RT]
	  - Remove outdated code
	  - Introduce SegmentMemory, BaseProfileMemory, FullProfileMemory classes
	    - Manage memory allocation/deallocation/copying/freezing
	  - Minor cleanups

	[ORCA RT]
	  - Add empty ORCAHSALoaderContext::SegmentFreeze

	Testing: precheckin (http://ocltc.amd.com:8111/viewModification.html?modId=60551&personal=true&tab=vcsModificationBuilds)
	ReviewBoardURL: http://ocltc.amd.com/reviews/r/8681/

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/executable.cpp#14 integrate
... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/executable.hpp#10 integrate
... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/loaders.cpp#4 integrate
... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/loaders.hpp#4 integrate
... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/include/amd_hsa_loader.hpp#6 integrate
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#62 edit


[ROCm/clr commit: e3ff5a9c7d]
2015-10-20 13:54:35 -04:00
foreman 3abda1bcae P4 to Git Change 1201490 by xcui@merged_opencl_jxcwin on 2015/10/20 10:47:18
SWDEV-41018 -  if system is equal to or less than 2GB memory, disable CPU and APU for OpenCL, and force the device to be 1.2 if it is a discrete GPU.

	precheckin:
	http://ocltc.amd.com:8111/viewModification.html?modId=60516&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true
	code review:
	http://ocltc.amd.com/reviews/r/8738/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#277 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#531 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#331 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.hpp#95 edit


[ROCm/clr commit: 25bfbb8085]
2015-10-20 11:02:14 -04:00
foreman ccf1cea91c P4 to Git Change 1201301 by skudchad@skudchad_test_win_opencl2 on 2015/10/19 19:19:44
SWDEV-77172 - IOMMUv2 changes for Windows 10
	- Pass the GPUVM offset to MonitoredFence GPUVA as well
	- Other minor changes for SVM

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

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#148 edit


[ROCm/clr commit: 4da269fbb6]
2015-10-19 19:29:07 -04:00
foreman c84b3479f8 P4 to Git Change 1201249 by jatang@jatang-opencl-hsa-stg2 on 2015/10/19 16:47:00
SWDEV-78799 - Fix a division by 0 error.

	Occasionally the profiling duration of some light weight kernel is 0, and would cause division by 0 error to the WLAlgorithmSmooth algorithm. We can just skip collecting this duration for the adaption algorithm.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.cpp#11 edit


[ROCm/clr commit: b06ee3a1a9]
2015-10-19 17:41:21 -04:00
foreman 4da631e2e2 P4 to Git Change 1200905 by bdhanase@bala_workpc_ocl on 2015/10/16 18:57:48
SWDEV-78103 - If USWC size is less than 1.5 GB, then report 50% else report 75%.

	Reviewed by: German

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#530 edit


[ROCm/clr commit: 54aed91b3b]
2015-10-16 19:04:45 -04:00
foreman df9060dc93 P4 to Git Change 1200677 by mbareghe@mbareghe_stg_win30 on 2015/10/16 10:11:30
SWDEV-78915 - SYCL - segfault building SPIR binary where the kernel name exceeds 255 characters - changed kernel/arg name type from char[] to string to avoid the 256 character limitation.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#304 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#122 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#211 edit


[ROCm/clr commit: fab877c56d]
2015-10-16 10:20:54 -04:00
foreman c296a56b07 P4 to Git Change 1200252 by jatang@jatang-opencl-hsa-stg1 on 2015/10/15 11:56:48
SWDEV-56468 - Back out changelist 1200206

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#303 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#121 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#387 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.hpp#7 edit


[ROCm/clr commit: 4b286ad468]
2015-10-15 12:08:34 -04:00
foreman 5a8f670bc5 P4 to Git Change 1200206 by jatang@jatang-opencl-hsa-stg1 on 2015/10/15 10:08:51
SWDEV-56468 - Support wave limiter in HSAIL path.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#302 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#120 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#386 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.hpp#6 edit


[ROCm/clr commit: 19ecdf3fd1]
2015-10-15 10:21:27 -04:00
foreman ff2d1b3000 P4 to Git Change 1198011 by emankov@em-hsa-amd on 2015/10/08 11:16:29
SWDEV-77522 - fix for erroneous CL_DEVICE_VERSION reporting by RT for HSAIL.

	[Synopsis]
	On a CI+ Device (KV, for example) if GPU_HSAIL_ENABLE=1 (which forcing HSAIL) CL_DEVICE_VERSION reported by RT is 1.2; if GPU_HSAIL_ENABLE=0 (default for now), then CL_DEVICE_VERSION = 2.0. It looks like this behaviour exists since then HSAIL was based on EDG, which supports only OpenCL 1.2. Now when HSAIL is based on Clang and supports OpenCL 2.0, there is no need in lowering CL Device Version at all for all CI+ devices nomatter the default path is (HSAIL or AMDIL).

	This bug is a stopper for enabling HSAIL by default for OpenCL 1.2. Actually the problem occurs with OpenCL 2.0 programs when forcing them on HSAIL but with -cl-std=CL2.0 option, since they couldn't be executed on 1.2 device.

	Testing: Pre check-in.

	Reviewer: German Andryeyev

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#330 edit


[ROCm/clr commit: 3e0185a205]
2015-10-08 11:27:15 -04:00
foreman ced0ffc42c P4 to Git Change 1197728 by xcui@merged_opencl_jxcwin on 2015/10/07 18:15:58
SWDEV-59579 - using existing function to simplify the code.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#301 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#385 edit


[ROCm/clr commit: bc8a28c577]
2015-10-07 19:24:44 -04:00
foreman c7adad3eb0 P4 to Git Change 1197295 by gandryey@gera-ubuntu14 on 2015/10/06 14:50:12
SWDEV-78052 - [CQE-OCL][DTB][QR][LNX]RQ conf test "Multiple device context" fails in few asics due to CL#1196902
	- Restore synchronization on the DMA engine. OCL doesn't require a sync, because resource isn't busy on the CAL device. However without sync there are less CBs available. Conformanace multidevice test will create around 60 queues, instead of 70

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#147 edit


[ROCm/clr commit: 86bc25cad2]
2015-10-06 15:00:30 -04:00
foreman fb0cfaeef3 P4 to Git Change 1197288 by mbareghe@mbareghe_stg_win30 on 2015/10/06 14:29:07
SWDEV-78024 - SYCL - Issue with printf when printing a string without format specifier - removed the condition to expand printf only if it has more than one arguemnt.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/AMDILPrintfConvert.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/test/CodeGen/AMDIL/printf_without_format_specifier.ll#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#39 edit


[ROCm/clr commit: cb963bf9eb]
2015-10-06 14:37:59 -04:00
foreman 6039d4e884 P4 to Git Change 1196959 by jatang@jatang-opencl-hsa-stg2 on 2015/10/05 15:47:53
SWDEV-77321 - Change some Wave Limiter variables to 64bit to avoid integer overflow.

	Luxmark v3.0 is getting performance regression due to incorrect adapting result caused by integer overflow:

	ratio_[wave] = trial_[wave] * 100 / reference_[wave];

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.hpp#5 edit


[ROCm/clr commit: 112a70b4ec]
2015-10-05 15:53:47 -04:00
foreman eb828d74ed P4 to Git Change 1196935 by jatang@jatang-ocl-lnx1 on 2015/10/05 14:37:02
SWDEV-77321 - Runtime to replace metadata LimitWave with WavePerSimdHint.

	Compiler has changed LimitWave to WavePerSimdHint, so runtime need to make corresponding change to have the Wave Limiter continue working.

	WavePerSimdHint=1,...,10 will be dealt with later.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#258 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#300 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#119 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.cpp#8 edit


[ROCm/clr commit: d4d9167613]
2015-10-05 14:48:16 -04:00
foreman 0068d75f03 P4 to Git Change 1196902 by gandryey@gera-dev-w7 on 2015/10/05 13:18:47
SWDEV-77981 - Clean-up CAL map/unmap functionality
	- Keep map information only for SDMA copy. GSL map/unmap doesn't require any tracking
	- simplify the interface to return the address from map()

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#229 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#85 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/EventQueue.h#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#80 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#146 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#58 edit


[ROCm/clr commit: 7b6c0331d1]
2015-10-05 13:25:42 -04:00
foreman 7b852c18c0 P4 to Git Change 1196584 by gandryey@gera-dev-w7 on 2015/10/02 14:01:41
SWDEV-77880 - Enable memory dependency tracking for HSAIL path
	- Use read/write attribute provided by the compiler for async execution optimization

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#299 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#118 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#384 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#136 edit


[ROCm/clr commit: f8648f412d]
2015-10-02 14:19:07 -04:00
foreman 367795798b P4 to Git Change 1196382 by rili@rili_opencl_stg on 2015/10/01 16:18:37
SWDEV-58155 -  Reduce maximum size of queue on device from 16MB to 8MB.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#529 edit


[ROCm/clr commit: 3847ee8ceb]
2015-10-01 16:27:15 -04:00
foreman 5c65ad4b9b P4 to Git Change 1196211 by nhaustov@nhaustov_hsa on 2015/10/01 08:27:23
SWDEV-76911 - Bug 11070: ViennaCL fails in amd::hsa::loader::Executable::Destroy

	Destructors of global variables run in undefined order, so loader cannot
	be global. Encapsulate loader functionality in Loader class and link its lifecycle
	to Runtime.
	In HSA Runtime, create Loader as part of Runtime singleton.
	In ORCA Runtime, create Loader as part of HSAILProgram class.

	Testing: smoke, pre-checkin

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/amdhsacod/amdhsacod.cpp#10 integrate
... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/executable.cpp#12 integrate
... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/executable.hpp#8 integrate
... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/include/amd_hsa_loader.hpp#5 integrate
... //depot/stg/opencl/drivers/opencl/compiler/tools/aoc2/aoc2.cpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#210 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#61 edit


[ROCm/clr commit: f670ae2f8d]
2015-10-01 08:37:19 -04:00
foreman 2c69b8cf47 P4 to Git Change 1195721 by yaxunl@yaxunl_stg_win50 on 2015/09/29 20:02:58
SWDEV-77154 - SPIR-V: runtime change for separate compile/link of SPIR-V module.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_program.cpp#38 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#209 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#71 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#34 edit


[ROCm/clr commit: 2994854677]
2015-09-30 00:42:49 -04:00
foreman f0b198a471 P4 to Git Change 1195643 by lnguyen@P4_LN on 2015/09/29 16:07:33
SWDEV-5 - Updated power strip table.

Affected files ...

... //depot/stg/opencl/drivers/opencl/tools/teamcity/server/scripts/teamcity.xml#49 edit


[ROCm/clr commit: 4f8410dbdb]
2015-09-30 00:26:52 -04:00
foreman 1dfcf47f9d P4 to Git Change 1195730 by smekhano@stas-rampitec-hsa on 2015/09/29 20:53:01
SWDEV-77584 - HSA HLC: fixed reflection metadata generation on HSAIL OCL 1.2 path
	We are producing 6 extra arguments, but metadata was produced only for 3.
	Removed KE_OCL12_NUM_ARGS define to avoid confusion.

	Testing: smoke, precheckin
	Reviewed by Yaxun Liu

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDOpenCLKernenv.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/Scalar/AMDInsertOpenCLKernenv.cpp#10 edit


[ROCm/clr commit: fa3fd90fb0]
2015-09-30 00:10:02 -04:00
foreman 5000c4feb0 P4 to Git Change 1195487 by gandryey@gera-dev-w7 on 2015/09/29 11:12:06
SWDEV-77545 - Relax Cypress restriction on SDMA copy
	- The original check for offest was wrong. We have to check the linear buffer alignment

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#145 edit


[ROCm/clr commit: 1eab831776]
2015-09-29 11:28:33 -04:00
foreman e62927e280 P4 to Git Change 1195265 by gandryey@gera-dev-w7 on 2015/09/28 18:56:37
SWDEV-77545 - Relax Cypress restriction on SDMA copy
	- Relax the old condition to match SI+ restriction

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#144 edit


[ROCm/clr commit: add3bbd202]
2015-09-28 19:41:22 -04:00
foreman 3db2d0ead4 P4 to Git Change 1195141 by gandryey@gera-dev-w7 on 2015/09/28 15:09:34
SWDEV-77522 - Remove direct references to the Resource object
	- In non-VM mode Resource was used as a memory object outside of SW heap

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#119 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.hpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuconstbuf.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuconstbuf.hpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#528 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#153 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#298 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#117 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#49 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#38 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.hpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#208 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#60 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#228 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#84 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#383 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#135 edit


[ROCm/clr commit: 4b23814a4d]
2015-09-28 17:41:36 -04:00
foreman 42be07afce P4 to Git Change 1193228 by xcui@merged_opencl_jxcwin on 2015/09/22 18:52:47
SWDEV-59579 - resubmit the changelist 1193161. refactory the Coare-grained SVM and  fine grain buffer  SVM code path, so that if the device SVM running on supports fine grain system, then the SVM API operation will be on system memory, no need to go through GPU backend. In addition, added support for PX system with CZ on windows 10, which  supports SVM fine grain system.

	code review:
	http://ocltc.amd.com/reviews/r/8530/
	precheckin:
	http://ocltc.amd.com:8111/viewModification.html?modId=58913&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#527 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#152 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#382 edit


[ROCm/clr commit: a3074a2a8f]
2015-09-22 18:59:36 -04:00
foreman cf3a9d00c7 P4 to Git Change 1193161 by xcui@merged_opencl_jxcwin on 2015/09/22 16:16:10
SWDEV-59579 - temporary Back out changelist 1193093

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#257 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#526 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#151 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#381 edit


[ROCm/clr commit: 9604ede937]
2015-09-22 16:26:19 -04:00