Skip to content

Commit

Permalink
cpu: x64: jit_avx2_1x1_conv: remove unneeded code
Browse files Browse the repository at this point in the history
 - remove unused variable
 - remove redundant switch cases
  • Loading branch information
kwiersch authored and vpirogov committed Nov 18, 2022
1 parent dd54d39 commit 2009164
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions src/cpu/x64/jit_avx2_1x1_conv_kernel_f32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ void jit_avx2_1x1_conv_kernel_f32::generate_reduce_loop(
auto get_output_offset = [=](int i, int j) {
switch (jcp.prop_kind) {
case backward_weights: return sizeof(float) * jcp.oc_block * j;
case backward_data:
default:
return (i * get_output_i_offset(jcp)
+ j * get_output_j_offset(jcp))
Expand All @@ -278,7 +277,6 @@ void jit_avx2_1x1_conv_kernel_f32::generate_reduce_loop(
+ (i ? reg_output_stride * i
: 0) // TODO: Xbyak should allow 0 scale
+ sizeof(float) * jcp.oc_block * j];
case backward_data:
default:
return ptr[aux_reg_output_data
+ (i * get_output_i_offset(jcp)
Expand Down
3 changes: 1 addition & 2 deletions src/cpu/x64/jit_avx2_1x1_conv_kernel_f32.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2016-2021 Intel Corporation
* Copyright 2016-2022 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 @@ -69,7 +69,6 @@ struct jit_avx2_1x1_conv_kernel_f32 : public jit_generator {
reg64_t load_loop_iter = r13;
reg64_t bcast_loop_iter = r14;
reg64_t reduce_loop_iter = r15;
reg64_t imm_addr64 = reduce_loop_iter;
reg64_t reg_reduce_pos_flag = r8;
reg64_t reg_output_stride = r12;
reg64_t reg_bias_data = r12;
Expand Down

0 comments on commit 2009164

Please sign in to comment.