| 442 | } |
| 443 | |
| 444 | Status ClGemm::validate_native(const ITensorInfo *a, |
| 445 | const ITensorInfo *b, |
| 446 | const ITensorInfo *c, |
| 447 | const ITensorInfo *output, |
| 448 | float alpha, |
| 449 | float beta, |
| 450 | const GEMMInfo &gemm_info) |
| 451 | { |
| 452 | ARM_COMPUTE_UNUSED(alpha); |
| 453 | ARM_COMPUTE_UNUSED(output); |
| 454 | |
| 455 | // Get the GPU target |
| 456 | const GPUTarget gpu_target = CLScheduler::get().target(); |
| 457 | DataType data_type = a->data_type(); |
| 458 | bool reinterpret_input_as_3d = gemm_info.reinterpret_input_as_3d(); |
| 459 | const unsigned int m = reinterpret_input_as_3d ? (a->dimension(1) * a->dimension(2)) : a->dimension(1); |
| 460 | const unsigned int n = b->dimension(0); |
| 461 | const unsigned int k = a->dimension(0); |
| 462 | const unsigned int batch_size = reinterpret_input_as_3d ? a->dimension(3) : a->dimension(2); |
| 463 | const int depth_output_gemm3d = gemm_info.depth_output_gemm3d(); |
| 464 | const bool broadcast_bias = gemm_info.broadcast_bias(); |
| 465 | |
| 466 | GEMMKernelInfo kernel_info; |
| 467 | kernel_info.m = m; |
| 468 | kernel_info.n = n; |
| 469 | kernel_info.k = k; |
| 470 | kernel_info.depth_output_gemm3d = depth_output_gemm3d; |
| 471 | kernel_info.reinterpret_input_as_3d = reinterpret_input_as_3d; |
| 472 | kernel_info.broadcast_bias = broadcast_bias; |
| 473 | kernel_info.activation_info = gemm_info.activation_info(); |
| 474 | |
| 475 | auto config = auto_heuristics::select_mlgo_gemm_config_reshaped_only_rhs( |
| 476 | auto_heuristics::CommonQuery{gpu_target, data_type, m, n, k, batch_size}); |
| 477 | |
| 478 | // Validate matrix multiply |
| 479 | ARM_COMPUTE_RETURN_ON_ERROR(ClGemmMatrixMultiplyNativeKernel::validate( |
| 480 | a, b, c, output, alpha, beta, config.lhs_info, config.rhs_info, kernel_info)); |
| 481 | |
| 482 | return Status{}; |
| 483 | } |
| 484 | |
| 485 | Status ClGemm::validate_reshaped(const ITensorInfo *a, |
| 486 | const ITensorInfo *b, |
nothing calls this directly
no test coverage detected