Skip to content

Commit 6b90d64

Browse files
committed
xe: rnn: adhere to class name style
1 parent dca0f27 commit 6b90d64

File tree

6 files changed

+32
-32
lines changed

6 files changed

+32
-32
lines changed

src/gpu/intel/ocl/rnn/cell_common.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2019-2024 Intel Corporation
2+
* Copyright 2019-2025 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -120,7 +120,7 @@ status_t compute_cell_fwd(const exec_ctx_t &ctx,
120120
}
121121

122122
template <prop_kind_t aprop>
123-
cell_execution_sig((_simple_rnn_common_t<aprop>::cell_execution)) {
123+
cell_execution_sig((simple_rnn_common_t<aprop>::cell_execution)) {
124124
const conf_t &rnn = this->pd()->rnn_conf;
125125
const ocl_conf_t &ocl_conf = this->pd()->ocl_conf;
126126
const rnn_offsets_t &offsets = this->pd()->off;

src/gpu/intel/ocl/rnn/cell_gru.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2019-2024 Intel Corporation
2+
* Copyright 2019-2025 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ using namespace dnnl::impl::utils;
2828
using namespace rnn_utils;
2929

3030
template <prop_kind_t aprop>
31-
cell_execution_sig((_simple_rnn_common_t<aprop>::cell_execution_gru)) {
31+
cell_execution_sig((simple_rnn_common_t<aprop>::cell_execution_gru)) {
3232
const conf_t &rnn = this->pd()->rnn_conf;
3333
const ocl_conf_t &ocl_conf = this->pd()->ocl_conf;
3434
const rnn_offsets_t &offsets = this->pd()->off;

src/gpu/intel/ocl/rnn/cell_gru_lbr.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2019-2024 Intel Corporation
2+
* Copyright 2019-2025 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ template cell_execution_sig(simple_rnn_fwd_t::cell_execution_gru_lbr);
3333
template cell_execution_sig(simple_rnn_bwd_t::cell_execution_gru_lbr);
3434

3535
template <prop_kind_t aprop>
36-
cell_execution_sig((_simple_rnn_common_t<aprop>::cell_execution_gru_lbr)) {
36+
cell_execution_sig((simple_rnn_common_t<aprop>::cell_execution_gru_lbr)) {
3737
const conf_t &rnn = this->pd()->rnn_conf;
3838
const ocl_conf_t &ocl_conf = this->pd()->ocl_conf;
3939
const rnn_offsets_t &offsets = this->pd()->off;

src/gpu/intel/ocl/rnn/rnn_grid.cpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2019-2024 Intel Corporation
2+
* Copyright 2019-2025 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -461,7 +461,7 @@ status_t ocl_conf_t::init_kernel_ctx(compute::kernel_ctx_t &kernel_ctx) const {
461461
}
462462

463463
template <>
464-
status_t _simple_rnn_common_t<prop_kind::forward>::pd_t::set_default_params() {
464+
status_t simple_rnn_common_t<prop_kind::forward>::pd_t::set_default_params() {
465465
using namespace format_tag;
466466
if (src_layer_md_.format_kind == format_kind::any)
467467
CHECK(memory_desc_init_by_tag(src_layer_md_, tnc));
@@ -489,7 +489,7 @@ status_t _simple_rnn_common_t<prop_kind::forward>::pd_t::set_default_params() {
489489
}
490490

491491
template <>
492-
status_t _simple_rnn_common_t<prop_kind::backward>::pd_t::set_default_params() {
492+
status_t simple_rnn_common_t<prop_kind::backward>::pd_t::set_default_params() {
493493
using namespace format_tag;
494494
int arch_ld = is_xe_hpc ? 128 : 64;
495495
if (src_layer_md_.format_kind == format_kind::any)
@@ -564,7 +564,7 @@ status_t _simple_rnn_common_t<prop_kind::backward>::pd_t::set_default_params() {
564564
}
565565

566566
template <prop_kind_t aprop>
567-
status_t _simple_rnn_common_t<aprop>::pd_t::init(impl::engine_t *engine) {
567+
status_t simple_rnn_common_t<aprop>::pd_t::init(impl::engine_t *engine) {
568568
using namespace prop_kind;
569569
using namespace utils;
570570
using namespace rnn_utils;
@@ -948,7 +948,7 @@ status_t _simple_rnn_common_t<aprop>::pd_t::init(impl::engine_t *engine) {
948948
}
949949

950950
template <prop_kind_t aprop>
951-
status_t _simple_rnn_common_t<aprop>::init(impl::engine_t *engine) {
951+
status_t simple_rnn_common_t<aprop>::init(impl::engine_t *engine) {
952952
using namespace rnn_utils;
953953

954954
switch (pd()->cell_kind()) {
@@ -1043,7 +1043,7 @@ status_t _simple_rnn_common_t<aprop>::init(impl::engine_t *engine) {
10431043
}
10441044

10451045
template <prop_kind_t aprop>
1046-
status_t _simple_rnn_common_t<aprop>::init_res_storage(
1046+
status_t simple_rnn_common_t<aprop>::init_res_storage(
10471047
impl::engine_t *engine, gpu_resource_t *r) const {
10481048
if (pd()->rnn_conf.is_int8 && pd()->rnn_conf.copy_bias) {
10491049
dim_t size = pd()->rnn_conf.n_gates * pd()->rnn_conf.dhc
@@ -1086,7 +1086,7 @@ status_t _simple_rnn_common_t<aprop>::init_res_storage(
10861086
}
10871087

10881088
template <prop_kind_t aprop>
1089-
gemm_sig((_simple_rnn_common_t<aprop>::gemm_primitive)) {
1089+
gemm_sig((simple_rnn_common_t<aprop>::gemm_primitive)) {
10901090
// We flip A and B here since the GEMM API is row major but the
10911091
// RNN code describes GEMM in column major fashion
10921092
gemm_exec_args_t gemm_args;
@@ -1171,7 +1171,7 @@ gemm_sig((_simple_rnn_common_t<aprop>::gemm_primitive)) {
11711171

11721172
//*************** Grid computations strategy: linear ***************//
11731173
template <prop_kind_t aprop>
1174-
grid_execution_sig((_simple_rnn_common_t<aprop>::linear_execution)) {
1174+
grid_execution_sig((simple_rnn_common_t<aprop>::linear_execution)) {
11751175
const conf_t &rnn = pd()->rnn_conf;
11761176
dim_t n_layer = rnn.n_layer;
11771177
dim_t n_dir = rnn.n_dir;
@@ -1257,7 +1257,7 @@ grid_execution_sig((_simple_rnn_common_t<aprop>::linear_execution)) {
12571257
//********* GRID computations strategy: utility functions **********//
12581258

12591259
template <prop_kind_t aprop>
1260-
status_t _simple_rnn_common_t<aprop>::bias_prepare(const exec_ctx_t &ctx,
1260+
status_t simple_rnn_common_t<aprop>::bias_prepare(const exec_ctx_t &ctx,
12611261
compute::compute_stream_t *compute_stream, dim_t n_layer, dim_t n_dir,
12621262
dim_t n_bias, dim_t n_gates, dim_t dhc, const memory_storage_t &ws_bias,
12631263
const memory_storage_t &scales, const memory_storage_t &wei_layer,
@@ -1289,7 +1289,7 @@ status_t _simple_rnn_common_t<aprop>::bias_prepare(const exec_ctx_t &ctx,
12891289
}
12901290

12911291
template <prop_kind_t aprop>
1292-
status_t _simple_rnn_common_t<aprop>::copy_init_layer(const exec_ctx_t &ctx,
1292+
status_t simple_rnn_common_t<aprop>::copy_init_layer(const exec_ctx_t &ctx,
12931293
compute::compute_stream_t *compute_stream, bool lr, bool rl,
12941294
dim_t batch, dim_t dhc, dim_t slc, dim_t n_iter, dim_t n_layer,
12951295
dim_t n_dir, dim_t n_states, dim_t states_ws_ld,
@@ -1348,7 +1348,7 @@ status_t _simple_rnn_common_t<aprop>::copy_init_layer(const exec_ctx_t &ctx,
13481348
}
13491349

13501350
template <prop_kind_t aprop>
1351-
status_t _simple_rnn_common_t<aprop>::copy_init_iter(const exec_ctx_t &ctx,
1351+
status_t simple_rnn_common_t<aprop>::copy_init_iter(const exec_ctx_t &ctx,
13521352
compute::compute_stream_t *compute_stream, dim_t batch, dim_t dhc,
13531353
dim_t sic, dim_t n_iter, dim_t n_layer, dim_t n_dir, dim_t n_states,
13541354
dim_t states_ws_ld, dim_t scratch_diff_states_ld,
@@ -1420,7 +1420,7 @@ status_t _simple_rnn_common_t<aprop>::copy_init_iter(const exec_ctx_t &ctx,
14201420
}
14211421

14221422
template <prop_kind_t aprop>
1423-
status_t _simple_rnn_common_t<aprop>::copy_res_layer(const exec_ctx_t &ctx,
1423+
status_t simple_rnn_common_t<aprop>::copy_res_layer(const exec_ctx_t &ctx,
14241424
compute::compute_stream_t *compute_stream, bool lr, bool rl,
14251425
dim_t batch, dim_t dhc, dim_t slc, dim_t n_iter, dim_t n_layer,
14261426
dim_t n_dir, dim_t n_states, dim_t states_ws_ld,
@@ -1482,7 +1482,7 @@ status_t _simple_rnn_common_t<aprop>::copy_res_layer(const exec_ctx_t &ctx,
14821482
}
14831483

14841484
template <prop_kind_t aprop>
1485-
status_t _simple_rnn_common_t<aprop>::copy_res_iter(const exec_ctx_t &ctx,
1485+
status_t simple_rnn_common_t<aprop>::copy_res_iter(const exec_ctx_t &ctx,
14861486
compute::compute_stream_t *compute_stream, dim_t batch, dim_t dhc,
14871487
dim_t sic, dim_t n_iter, dim_t n_layer, dim_t n_dir, dim_t n_states,
14881488
dim_t states_ws_ld, dim_t scratch_diff_states_ld,
@@ -1557,7 +1557,7 @@ status_t _simple_rnn_common_t<aprop>::copy_res_iter(const exec_ctx_t &ctx,
15571557
//********************* Execution function *********************//
15581558

15591559
template <prop_kind_t aprop>
1560-
status_t _simple_rnn_common_t<aprop>::execute_(const exec_ctx_t &ctx) const {
1560+
status_t simple_rnn_common_t<aprop>::execute_(const exec_ctx_t &ctx) const {
15611561

15621562
impl::engine_t *engine = ctx.stream()->engine();
15631563
auto *compute_stream
@@ -1722,8 +1722,8 @@ elemwise_sig_gru(simple_rnn_fwd_t::gru_elemwise);
17221722
template <>
17231723
elemwise_sig_gru(simple_rnn_bwd_t::gru_elemwise);
17241724

1725-
template struct _simple_rnn_common_t<prop_kind::forward>;
1726-
template struct _simple_rnn_common_t<prop_kind::backward>;
1725+
template struct simple_rnn_common_t<prop_kind::forward>;
1726+
template struct simple_rnn_common_t<prop_kind::backward>;
17271727

17281728
} // namespace ocl
17291729
} // namespace intel

src/gpu/intel/ocl/rnn/rnn_grid.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ enum gemm_kind_t {
5555
};
5656

5757
template <prop_kind_t aprop>
58-
struct _simple_rnn_common_t : public gpu_primitive_t {
58+
struct simple_rnn_common_t : public gpu_primitive_t {
5959
using gpu_primitive_t::gpu_primitive_t;
6060

61-
using class_name = _simple_rnn_common_t<aprop>;
61+
using class_name = simple_rnn_common_t<aprop>;
6262

6363
using elemwise_f = elemwise_sig((class_name::*));
6464
using elemwise_gru_f = elemwise_sig_gru((class_name::*));
@@ -263,8 +263,8 @@ struct _simple_rnn_common_t : public gpu_primitive_t {
263263

264264
enum { SCALES_ = 0, TM_SCALES_ = 1 };
265265
};
266-
using simple_rnn_fwd_t = _simple_rnn_common_t<prop_kind::forward>;
267-
using simple_rnn_bwd_t = _simple_rnn_common_t<prop_kind::backward>;
266+
using simple_rnn_fwd_t = simple_rnn_common_t<prop_kind::forward>;
267+
using simple_rnn_bwd_t = simple_rnn_common_t<prop_kind::backward>;
268268
} // namespace ocl
269269
} // namespace intel
270270
} // namespace gpu

src/gpu/intel/ocl/rnn/simple_rnn_postgemm.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2019-2024 Intel Corporation
2+
* Copyright 2019-2025 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ using namespace dnnl::impl::gpu::intel::gpu_utils;
2727
using namespace rnn_utils;
2828

2929
template <prop_kind_t aprop>
30-
elemwise_sig((_simple_rnn_common_t<aprop>::rnn_elemwise)) {
30+
elemwise_sig((simple_rnn_common_t<aprop>::rnn_elemwise)) {
3131
auto nd_range = get_nd_range({dhc,
3232
utils::div_up(
3333
batch, aprop == prop_kind::forward ? 1 : bwd_batch_block)});
@@ -101,7 +101,7 @@ template elemwise_sig(simple_rnn_fwd_t::rnn_elemwise);
101101
template elemwise_sig(simple_rnn_bwd_t::rnn_elemwise);
102102

103103
template <prop_kind_t aprop>
104-
elemwise_sig((_simple_rnn_common_t<aprop>::lstm_elemwise)) {
104+
elemwise_sig((simple_rnn_common_t<aprop>::lstm_elemwise)) {
105105
auto nd_range = get_nd_range({dhc,
106106
utils::div_up(
107107
batch, aprop == prop_kind::forward ? 1 : bwd_batch_block)});
@@ -176,7 +176,7 @@ template elemwise_sig(simple_rnn_fwd_t::lstm_elemwise);
176176
template elemwise_sig(simple_rnn_bwd_t::lstm_elemwise);
177177

178178
template <prop_kind_t aprop>
179-
elemwise_sig((_simple_rnn_common_t<aprop>::lstm_elemwise_u8s8)) {
179+
elemwise_sig((simple_rnn_common_t<aprop>::lstm_elemwise_u8s8)) {
180180
auto nd_range = get_nd_range({dhc,
181181
utils::div_up(
182182
batch, aprop == prop_kind::forward ? 1 : bwd_batch_block)});
@@ -235,7 +235,7 @@ template elemwise_sig(simple_rnn_fwd_t::lstm_elemwise_u8s8);
235235
template elemwise_sig(simple_rnn_bwd_t::lstm_elemwise_u8s8);
236236

237237
template <prop_kind_t aprop>
238-
elemwise_sig_gru_lbr((_simple_rnn_common_t<aprop>::gru_lbr_elemwise)) {
238+
elemwise_sig_gru_lbr((simple_rnn_common_t<aprop>::gru_lbr_elemwise)) {
239239
auto nd_range = get_nd_range({dhc,
240240
utils::div_up(
241241
batch, aprop == prop_kind::forward ? 1 : bwd_batch_block)});
@@ -311,7 +311,7 @@ template elemwise_sig_gru_lbr(simple_rnn_fwd_t::gru_lbr_elemwise);
311311
template elemwise_sig_gru_lbr(simple_rnn_bwd_t::gru_lbr_elemwise);
312312

313313
template <prop_kind_t aprop>
314-
elemwise_sig_gru((_simple_rnn_common_t<aprop>::gru_elemwise)) {
314+
elemwise_sig_gru((simple_rnn_common_t<aprop>::gru_elemwise)) {
315315
auto nd_range = get_nd_range({dhc,
316316
utils::div_up(
317317
batch, aprop == prop_kind::forward ? 1 : bwd_batch_block)});

0 commit comments

Comments
 (0)