Commit Graph

5 Commits

Author SHA1 Message Date
foreman 4e9e419b6b P4 to Git Change 1187959 by kebai@kebai-lnx1 on 2015/09/04 01:54:42
ECR #304775 - Modify caching library code to be used by HSAIL runtime
	1. Remove dependencies on shader compiler version, amd::Os and amd::option
	2. Let version be one the of input
	3. Change all prefix "Kernel" to prefix "String", e.g., class name is modified from KernelCache to StringCache, etc.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/caching/cache.cpp#1 branch
... //depot/stg/opencl/drivers/opencl/compiler/tools/caching/cache.hpp#1 branch
2015-09-04 02:03:45 -04:00
foreman 02cf1c13a0 P4 to Git Change 1181309 by johtaylo@johtaylo_L7_stg on 2015/08/17 18:25:46
ECR #304775 - Preparation for kernel caching feature

	force line ending on files to one style. Precheckin does not capture this failure as it converts all text files to linux format so that both linux and windows can compile the code during precheckin.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.hpp#4 edit
2015-08-17 18:34:10 -04:00
foreman 7b52a80a63 P4 to Git Change 1181226 by kebai@kebai-lnx1 on 2015/08/17 16:11:30
ECR #304775 - Preparation for kernel caching feature
	1. Each device have a separate cache directory
	2. It logs caching errors, so we can debug the cache and/or detect collisions
	3. Implementeded cache size tracking, so we can evict old data when cache files are too large
	4. Added file/path access permission control on both windows and linux
	5. Have read/write file lock protection
	6. -kcache-disable flag can be used to turn on/off the caching functionality
	7. AMD_FORCE_KCACHE_TEST env variable is used for internal testing
	8. For the stage we want to cache, call getCacheEntry() followed by makeCacheEntry() if the get fails; otherwise directly return cached data.
	- After the compiler library code is refactored, getCacheEntry() and makeCacheEntry() will be wrapped into one function call, so that only one call is needed at the place we want to cache

	TO DO:
	1. Use it in the compiler library code
	- Waiting for the decision on how many stages we want to cache, i) 1-stage caching: source->ISA; or ii) 3-stage caching: source->LLVM IR, LLVM IR->IL, IL->ISA
	2. Tracking of timestamps for cache entries
	- LRU eviction when cache grows too large
	- Suggestion from Laurent: Regarding tracking timestamps for LRU eviction: Random eviction would probably perform as well as LRU and does not require timestamps.
	3. Track cache entries per application

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

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.cpp#3 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.hpp#3 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#127 edit
2015-08-17 16:27:05 -04:00
foreman 5637f52e00 P4 to Git Change 1170017 by kebai@kebai-lnx-desktop on 2015/07/13 14:12:55
ECR #304775 - Back out CL 1170011

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.cpp#2 delete
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.hpp#2 delete
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend.cpp#35 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend_clang.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/amdil_be.cpp#44 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#43 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#125 edit
... //depot/stg/opencl/drivers/opencl/tests/kcache/Makefile#2 delete
... //depot/stg/opencl/drivers/opencl/tests/kcache/build/Makefile#2 delete
... //depot/stg/opencl/drivers/opencl/tests/kcache/build/Makefile.kcache#2 delete
... //depot/stg/opencl/drivers/opencl/tests/kcache/kCacheTest_std.txt#2 delete
... //depot/stg/opencl/drivers/opencl/tests/kcache/kernel.cl#2 delete
... //depot/stg/opencl/drivers/opencl/tests/kcache/main.cpp#2 delete
2015-07-13 18:17:22 -04:00
foreman 4b6f2324d0 P4 to Git Change 1170011 by kebai@kebai-lnx-desktop on 2015/07/13 13:47:29
ECR #304775 - Bug 10752 kernel caching feature (AMDIL and HSAIL path)
	1. For the stage we want to cache, call getCacheEntry() followed by makeCacheEntry() if the get fails; otherwise directly return cached data.
	a. Each device have a separate cache directory
	b. It logs caching errors, so we can debug the cache and/or detect collisions
	2. Implementeded cache size tracking, so we can evict old data when cache files are too large
	3. Added file/path access permission control on both windows and linux
	4. Have read/write file lock protection
	5. -kcache-disable flag can be used to turn on/off the caching functionality
	6. AMD_FORCE_KCACHE_TEST env variable is used for internal testing

	TO DO:
	1. Tracking of timestamps for cache entries
	-LRU eviction when cache grows too large
	2. Track cache entries per application

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/cache.hpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend_clang.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#68 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/amdil_be.cpp#43 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#124 edit
... //depot/stg/opencl/drivers/opencl/tests/kcache/Makefile#1 add
... //depot/stg/opencl/drivers/opencl/tests/kcache/build/Makefile#1 add
... //depot/stg/opencl/drivers/opencl/tests/kcache/build/Makefile.kcache#1 add
... //depot/stg/opencl/drivers/opencl/tests/kcache/kCacheTest_std.txt#1 add
... //depot/stg/opencl/drivers/opencl/tests/kcache/kernel.cl#1 add
... //depot/stg/opencl/drivers/opencl/tests/kcache/main.cpp#1 add
2015-07-13 18:11:44 -04:00