@@ -783,8 +783,7 @@ void preprocessSizeForQLstm(std::shared_ptr<Graph>& graph) {
783
783
op_list_construct_same_states, op_list_construct_diff_states};
784
784
785
785
auto pattern = at::jit::CodeTemplate (R"(
786
- graph(%x, %scale, %zero_point, %quantize_dtype, %size_dim, %ld, %hidden_size, %scalar_type, %layout, %device, %pin_memory, %weight, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first):
787
- %quantized_input = aten::quantize_per_tensor(%x, %scale, %zero_point, %quantize_dtype)
786
+ graph(%quantized_input, %size_dim, %ld, %hidden_size, %scalar_type, %layout, %device, %pin_memory, %weight, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first):
788
787
%ret.3 = aten::dequantize(%quantized_input)
789
788
%max_batch_size : int = aten::size(%ret.3, %size_dim)
790
789
%ret.tensor : Tensor = prim::NumToTensor(%max_batch_size)
@@ -795,8 +794,7 @@ void preprocessSizeForQLstm(std::shared_ptr<Graph>& graph) {
795
794
return (%res.1, %res.2, %res.3) )" );
796
795
797
796
auto replacement = at::jit::CodeTemplate (R"(
798
- graph(%x, %scale, %zero_point, %quantize_dtype, %size_dim, %ld, %hidden_size, %scalar_type, %layout, %device, %pin_memory, %weight, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first):
799
- %quantized_input = aten::quantize_per_tensor(%x, %scale, %zero_point, %quantize_dtype)
797
+ graph(%quantized_input, %size_dim, %ld, %hidden_size, %scalar_type, %layout, %device, %pin_memory, %weight, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first):
800
798
%max_batch_size : int = aten::size(%quantized_input, %size_dim)
801
799
%ret.3 = aten::dequantize(%quantized_input)
802
800
%ret.tensor : Tensor = prim::NumToTensor(%max_batch_size)
0 commit comments