P4 to Git Change 1177220 by emankov@em-hsa-amd on 2015/08/05 06:08:39

ECR #333753 - ORCA RT/Compiler Lib/aoc2: AMD HSA Code Object Import feature (part II) - arbitrary hidden (extra) kernargs support

	Only HSAIL path is affected. It doesn't affect blit kernels.

	To use offline by aoc2:
	aoc2 -hsacodeobject=<importing_code_object_filename> -numhiddenkernargs=<num> -cl-std=CL2.0 -march=hsail(-64) -mdevice=Bonaire <source_cl_filename>

	To use online by setting env:
	AMD_DEBUG_HSA_NUM_HIDDEN_KERNARGS=<num>

	where num >= 0. If num == 0, then no additional arguments will be added on RT for every kernel. The default value is unchanged and equal to 6 for now.

	Misc:
	+ get rid of PRE & POST defines in Compiler Lib, as they started to conflict with ugl\gl\gs\hwl\ headers with the same defines.
	+ minor copy/paste eliminations & typo fixes
	+ ocltst complib tests update

	Testing: pre check-in, manually based on ocl sdk MatrixMultiplication

	Reviewers: Brian Sumner, German Andryeyev, Nikolay Haustov, Artem Tamazov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#72 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#49 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/metadata.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclDefs.h#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclEnums.h#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclStructs.h#17 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/bif_section_labels.hpp#21 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#20 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/aoc2/aoc2.cpp#74 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#181 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#249 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#291 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#113 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#199 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#369 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsaprogram.cpp#38 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsakernel.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsakernel.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsaprogram.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.cpp#43 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLAssumptionCheck.cpp#43 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLEnumCheck.cpp#44 edit
Bu işleme şunda yer alıyor:
foreman committed 2015-08-05 06:18:33 -04:00
1 ebeveyn 881eeab3b8
işleme 81b331f4c5
14 files changed
+214 -93

No files matched your search

+6
Dosyayı Görüntüle
@@ -28,4 +28,10 @@
#define BIF_API_3_0
#endif
#ifndef MAX_HIDDEN_KERNARGS_NUM
#define MAX_HIDDEN_KERNARGS_NUM 6
#else
#error "MAX_HIDDEN_KERNARGS_NUM is already defined"
#endif
#endif // _ACL_DEFS_0_8_H_
+24 -23
Dosyayı Görüntüle
@@ -188,29 +188,30 @@ typedef enum _bif_sections_enum_0_8 {
//! An enumeration that defines what are valid queries for aclQueryInfo.
typedef enum _rt_query_types_enum_0_8 {
RT_ABI_VERSION = 0,
RT_DEVICE_NAME = 1,
RT_MEM_SIZES = 2,
RT_GPU_FUNC_CAPS = 3,
RT_GPU_FUNC_ID = 4,
RT_GPU_DEFAULT_ID = 5,
RT_WORK_GROUP_SIZE = 6,
RT_WORK_REGION_SIZE = 7,
RT_ARGUMENT_ARRAY = 8,
RT_GPU_PRINTF_ARRAY = 9,
RT_CPU_BARRIER_NAMES = 10,
RT_DEVICE_ENQUEUE = 11,
RT_KERNEL_INDEX = 12,
RT_KERNEL_NAME = 13,
RT_KERNEL_NAMES = 14,
RT_CONTAINS_LLVMIR = 15,
RT_CONTAINS_OPTIONS = 16,
RT_CONTAINS_BRIG = 17,
RT_CONTAINS_HSAIL = 18,
RT_CONTAINS_ISA = 19,
RT_CONTAINS_LOADER_MAP = 20,
RT_CONTAINS_SPIR = 21,
RT_LAST_TYPE = 22
RT_ABI_VERSION = 0,
RT_DEVICE_NAME = 1,
RT_MEM_SIZES = 2,
RT_GPU_FUNC_CAPS = 3,
RT_GPU_FUNC_ID = 4,
RT_GPU_DEFAULT_ID = 5,
RT_WORK_GROUP_SIZE = 6,
RT_WORK_REGION_SIZE = 7,
RT_ARGUMENT_ARRAY = 8,
RT_GPU_PRINTF_ARRAY = 9,
RT_CPU_BARRIER_NAMES = 10,
RT_DEVICE_ENQUEUE = 11,
RT_KERNEL_INDEX = 12,
RT_KERNEL_NAME = 13,
RT_KERNEL_NAMES = 14,
RT_CONTAINS_LLVMIR = 15,
RT_CONTAINS_OPTIONS = 16,
RT_CONTAINS_BRIG = 17,
RT_CONTAINS_HSAIL = 18,
RT_CONTAINS_ISA = 19,
RT_CONTAINS_LOADER_MAP = 20,
RT_CONTAINS_SPIR = 21,
RT_NUM_KERNEL_HIDDEN_ARGS = 22,
RT_LAST_TYPE = 23
} aclQueryType_0_8;
//! An enumeration for the various GPU capabilities
+1
Dosyayı Görüntüle
@@ -119,6 +119,7 @@ typedef struct _acl_metadata_0_8 {
const char *deviceName; // RT_DEVICE_NAME
bool enqueue_kernel; // RT_DEVICE_ENQUEUE
uint32_t kernel_index; // RT_KERNEL_INDEX
uint32_t numHiddenKernelArgs; // RT_NUM_KERNEL_HIDDEN_ARGS
} aclMetadata_0_8;
//! An structure that holds information on the capabilities of the bif device.