Fix retrieving device architecture twice in CLCompileContext

Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Change-Id: I12608eb4d681ea07d9d508226600a11365238a00
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5682
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/core/CL/CLCompileContext.cpp b/src/core/CL/CLCompileContext.cpp
index bf3a866..3f2975d 100644
--- a/src/core/CL/CLCompileContext.cpp
+++ b/src/core/CL/CLCompileContext.cpp
@@ -265,8 +265,7 @@
         ARM_COMPUTE_ERROR("Non uniform workgroup size is not supported!!");
     }
 
-    const GPUTarget arch = get_arch_from_target(_device.target());
-    if(arch != GPUTarget::UNKNOWN && arch != GPUTarget::MIDGARD)
+    if(gpu_arch != GPUTarget::UNKNOWN && gpu_arch != GPUTarget::MIDGARD)
     {
         const std::string device_vers = _device.device_version();
         const std::regex  ddk_regex("r([0-9]*)p[0-9]");