From a34286ecabf4fc9e66e423332063a3d5fb17b8f8 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 4 Sep 2018 12:18:50 +0100 Subject: COMPMID-1553: Add GPU detection for G52. Change-Id: Ief61733d0e66fec0c67255ad899c76933109b797 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/146794 Tested-by: Jenkins Reviewed-by: Michalis Spyrou --- src/runtime/CL/tuners/BifrostTuner.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'src/runtime/CL/tuners') diff --git a/src/runtime/CL/tuners/BifrostTuner.cpp b/src/runtime/CL/tuners/BifrostTuner.cpp index 59d73b4e79..187f52fcf7 100644 --- a/src/runtime/CL/tuners/BifrostTuner.cpp +++ b/src/runtime/CL/tuners/BifrostTuner.cpp @@ -132,7 +132,10 @@ void tune_col2im_kernel(CLCol2ImKernel &k) // Configure the local work size for Bifrost with a value obtained // via exhaustive autotuning over 30 representative tensor shapes. - if(gpu_target_is_in(gpu_target, GPUTarget::G71, GPUTarget::G72, GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, GPUTarget::G76)) + if(gpu_target_is_in(gpu_target, + GPUTarget::G71, GPUTarget::G72, GPUTarget::G76, + GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, + GPUTarget::G52, GPUTarget::G52LIT)) { if((k._convolved_dims.width == 7) || (k._convolved_dims.width == 14)) { @@ -153,7 +156,11 @@ void tune_im2col_kernel(CLIm2ColKernel &k) const GPUTarget gpu_target = k.get_target(); // Local work size optimized for the 11x11 AlexNet convolution on Bifrost. - if(gpu_target_is_in(gpu_target, GPUTarget::G71, GPUTarget::G72, GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, GPUTarget::G76) && k._kernel_dims.width == 11) + if(gpu_target_is_in(gpu_target, + GPUTarget::G71, GPUTarget::G72, GPUTarget::G76, + GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, + GPUTarget::G52, GPUTarget::G52LIT) + && k._kernel_dims.width == 11) { const bool is_square_kernel = (k._kernel_dims.width == k._kernel_dims.height); if(!is_square_kernel && k._kernel_dims.width > 1 && !k._conv_info.has_padding()) @@ -171,7 +178,10 @@ void tune_depthwise_im2col_kernel(CLDepthwiseIm2ColKernel &k) // Configure the local work size for Bifrost with a value obtained // via exhaustive autotuning for the MobileNets tensor shapes. - if(gpu_target_is_in(gpu_target, GPUTarget::G71, GPUTarget::G72, GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, GPUTarget::G76)) + if(gpu_target_is_in(gpu_target, + GPUTarget::G71, GPUTarget::G72, GPUTarget::G76, + GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, + GPUTarget::G52, GPUTarget::G52LIT)) { lws_hint = cl::NDRange(1, 2, 1); } @@ -186,7 +196,10 @@ void tune_gemv_kernel(CLGEMMMatrixVectorMultiplyKernel &k) // Configure the local work size for Bifrost with a value obtained // via exhaustive autotuning for the MobileNets tensor shapes. - if(gpu_target_is_in(gpu_target, GPUTarget::G71, GPUTarget::G72, GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, GPUTarget::G76)) + if(gpu_target_is_in(gpu_target, + GPUTarget::G71, GPUTarget::G72, GPUTarget::G76, + GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, + GPUTarget::G52, GPUTarget::G52LIT)) { lws_hint = cl::NDRange(1, 1, 1); } @@ -207,6 +220,8 @@ void tune_gemm_kernel(CLGEMMMatrixMultiplyKernel &k) case GPUTarget::G51: case GPUTarget::G51BIG: case GPUTarget::G51LIT: + case GPUTarget::G52: + case GPUTarget::G52LIT: case GPUTarget::G76: if(k._input1->info()->dimension(1) == 24) { @@ -240,7 +255,10 @@ void tune_pooling_kernel(CLPoolingLayerKernel &k) // invalid (e.g. exceeds the maximum workgroup size that the kernel can be launched with). if(k._input->info()->data_layout() == DataLayout::NCHW) { - if(gpu_target_is_in(gpu_target, GPUTarget::G71, GPUTarget::G72, GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, GPUTarget::G76)) + if(gpu_target_is_in(gpu_target, + GPUTarget::G71, GPUTarget::G72, GPUTarget::G76, + GPUTarget::G51, GPUTarget::G51BIG, GPUTarget::G51LIT, + GPUTarget::G52, GPUTarget::G52LIT)) { cl::NDRange gws = ICLKernel::gws_from_window(k.window()); lws_hint = cl::NDRange(gws[0], gws[1], 1); -- cgit v1.2.1