|
1 | 1 | /*******************************************************************************
|
2 |
| -* Copyright 2019-2024 Intel Corporation |
| 2 | +* Copyright 2019-2025 Intel Corporation |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * 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 {
|
461 | 461 | }
|
462 | 462 |
|
463 | 463 | 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() { |
465 | 465 | using namespace format_tag;
|
466 | 466 | if (src_layer_md_.format_kind == format_kind::any)
|
467 | 467 | 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() {
|
489 | 489 | }
|
490 | 490 |
|
491 | 491 | 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() { |
493 | 493 | using namespace format_tag;
|
494 | 494 | int arch_ld = is_xe_hpc ? 128 : 64;
|
495 | 495 | 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() {
|
564 | 564 | }
|
565 | 565 |
|
566 | 566 | 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) { |
568 | 568 | using namespace prop_kind;
|
569 | 569 | using namespace utils;
|
570 | 570 | using namespace rnn_utils;
|
@@ -948,7 +948,7 @@ status_t _simple_rnn_common_t<aprop>::pd_t::init(impl::engine_t *engine) {
|
948 | 948 | }
|
949 | 949 |
|
950 | 950 | 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) { |
952 | 952 | using namespace rnn_utils;
|
953 | 953 |
|
954 | 954 | switch (pd()->cell_kind()) {
|
@@ -1043,7 +1043,7 @@ status_t _simple_rnn_common_t<aprop>::init(impl::engine_t *engine) {
|
1043 | 1043 | }
|
1044 | 1044 |
|
1045 | 1045 | 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( |
1047 | 1047 | impl::engine_t *engine, gpu_resource_t *r) const {
|
1048 | 1048 | if (pd()->rnn_conf.is_int8 && pd()->rnn_conf.copy_bias) {
|
1049 | 1049 | 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(
|
1086 | 1086 | }
|
1087 | 1087 |
|
1088 | 1088 | 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)) { |
1090 | 1090 | // We flip A and B here since the GEMM API is row major but the
|
1091 | 1091 | // RNN code describes GEMM in column major fashion
|
1092 | 1092 | gemm_exec_args_t gemm_args;
|
@@ -1171,7 +1171,7 @@ gemm_sig((_simple_rnn_common_t<aprop>::gemm_primitive)) {
|
1171 | 1171 |
|
1172 | 1172 | //*************** Grid computations strategy: linear ***************//
|
1173 | 1173 | 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)) { |
1175 | 1175 | const conf_t &rnn = pd()->rnn_conf;
|
1176 | 1176 | dim_t n_layer = rnn.n_layer;
|
1177 | 1177 | dim_t n_dir = rnn.n_dir;
|
@@ -1257,7 +1257,7 @@ grid_execution_sig((_simple_rnn_common_t<aprop>::linear_execution)) {
|
1257 | 1257 | //********* GRID computations strategy: utility functions **********//
|
1258 | 1258 |
|
1259 | 1259 | 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, |
1261 | 1261 | compute::compute_stream_t *compute_stream, dim_t n_layer, dim_t n_dir,
|
1262 | 1262 | dim_t n_bias, dim_t n_gates, dim_t dhc, const memory_storage_t &ws_bias,
|
1263 | 1263 | 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,
|
1289 | 1289 | }
|
1290 | 1290 |
|
1291 | 1291 | 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, |
1293 | 1293 | compute::compute_stream_t *compute_stream, bool lr, bool rl,
|
1294 | 1294 | dim_t batch, dim_t dhc, dim_t slc, dim_t n_iter, dim_t n_layer,
|
1295 | 1295 | 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,
|
1348 | 1348 | }
|
1349 | 1349 |
|
1350 | 1350 | 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, |
1352 | 1352 | compute::compute_stream_t *compute_stream, dim_t batch, dim_t dhc,
|
1353 | 1353 | dim_t sic, dim_t n_iter, dim_t n_layer, dim_t n_dir, dim_t n_states,
|
1354 | 1354 | 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,
|
1420 | 1420 | }
|
1421 | 1421 |
|
1422 | 1422 | 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, |
1424 | 1424 | compute::compute_stream_t *compute_stream, bool lr, bool rl,
|
1425 | 1425 | dim_t batch, dim_t dhc, dim_t slc, dim_t n_iter, dim_t n_layer,
|
1426 | 1426 | 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,
|
1482 | 1482 | }
|
1483 | 1483 |
|
1484 | 1484 | 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, |
1486 | 1486 | compute::compute_stream_t *compute_stream, dim_t batch, dim_t dhc,
|
1487 | 1487 | dim_t sic, dim_t n_iter, dim_t n_layer, dim_t n_dir, dim_t n_states,
|
1488 | 1488 | 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,
|
1557 | 1557 | //********************* Execution function *********************//
|
1558 | 1558 |
|
1559 | 1559 | 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 { |
1561 | 1561 |
|
1562 | 1562 | impl::engine_t *engine = ctx.stream()->engine();
|
1563 | 1563 | auto *compute_stream
|
@@ -1722,8 +1722,8 @@ elemwise_sig_gru(simple_rnn_fwd_t::gru_elemwise);
|
1722 | 1722 | template <>
|
1723 | 1723 | elemwise_sig_gru(simple_rnn_bwd_t::gru_elemwise);
|
1724 | 1724 |
|
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>; |
1727 | 1727 |
|
1728 | 1728 | } // namespace ocl
|
1729 | 1729 | } // namespace intel
|
|
0 commit comments