Skip to content

Commit

Permalink
gpu: ocl: remove use of vla in post_ops
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoursler authored and karturov committed Feb 9, 2023
1 parent a1e6bc5 commit 41e8612
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/gpu/ocl/ocl_post_ops.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2019-2021 Intel Corporation
* Copyright 2019-2023 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -254,15 +254,12 @@ float fwd_Xnary(unsigned kind, unsigned algorithm, float x, float y,
is_burstable; \
})

#define BINARY_ARG_IS_SCALAR(idx) ({ false; })

#define APPLY_PO_BINARY(idx, accumulator, acc_elem_dt, x0, x0_s, x1, x1_s, \
x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, is_burst) \
{ \
const unsigned bin_arg_size = BINARY_ARG_IS_SCALAR(idx) \
? 1 \
: sizeof(accumulator) / sizeof(acc_elem_dt); \
float bin_arg[bin_arg_size]; \
const unsigned bin_arg_size \
= sizeof(accumulator) / sizeof(acc_elem_dt); \
float bin_arg[sizeof(accumulator) / sizeof(acc_elem_dt)]; \
float *bin_arg_ptr = &bin_arg[0]; \
const bool use_burst_read = IS_BURSTABLE(idx, x0, x0_s, x1, x1_s, x2, \
x2_s, x3, x3_s, x4, x4_s, x5, x5_s, is_burst); \
Expand Down

0 comments on commit 41e8612

Please sign in to comment.