Skip to content

Commit

Permalink
[ODLA/TRT] Add reduction_prod support
Browse files Browse the repository at this point in the history
  • Loading branch information
Weiming Zhao authored and weimingzha0 committed Aug 20, 2021
1 parent 050a80f commit 66a3da3
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions ODLA/platforms/tensorrt/odla_tensorrt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,14 @@ odla_value odla_ReduceSumSquare(odla_value input, odla_size_t num_of_axes,
output_dims, id);
}

odla_value odla_ReduceProd(odla_value input, odla_size_t num_of_axes,
const odla_uint32* axes, odla_bool keep_dims,
odla_value_shape output_dims,
const odla_value_id id) {
return reduce(input, nvinfer1::ReduceOperation::kPROD, num_of_axes, axes,
keep_dims, output_dims, id);
}

odla_value odla_LRN(odla_value input, odla_memory_layout input_layout,
odla_int32 window_size, odla_float32 alpha,
odla_float32 beta, odla_float32 bias,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_default_axes_keepdims_example | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_default_axes_keepdims_example_tensorrt.cc.tmp.main.cc.in"
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_reduce_prod_default_axes_keepdims_random/model.onnx -o %t.cc
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_reduce_prod_default_axes_keepdims_random/test_data_set_0 %odla_link %device_link -lodla_tensorrt -o %t_tensorrt.exe -Wno-deprecated-declarations
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_default_axes_keepdims_random | FileCheck %s
// RUN: %t_tensorrt.exe 0.002 0 tensorrt %data_path/test_reduce_prod_default_axes_keepdims_random | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_default_axes_keepdims_random_tensorrt.cc.tmp.main.cc.in"
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_do_not_keepdims_example | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_do_not_keepdims_example_tensorrt.cc.tmp.main.cc.in"
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_do_not_keepdims_random | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_do_not_keepdims_random_tensorrt.cc.tmp.main.cc.in"
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_keepdims_example | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_keepdims_example_tensorrt.cc.tmp.main.cc.in"
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_keepdims_random | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_keepdims_random_tensorrt.cc.tmp.main.cc.in"
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_negative_axes_keepdims_example | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_negative_axes_keepdims_example_tensorrt.cc.tmp.main.cc.in"
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// RUN: %t_tensorrt.exe 0.0001 0 tensorrt %data_path/test_reduce_prod_negative_axes_keepdims_random | FileCheck %s
// CHECK: Result Pass
// clang-format on
// XFAIL: *

#include "test_reduce_prod_negative_axes_keepdims_random_tensorrt.cc.tmp.main.cc.in"

0 comments on commit 66a3da3

Please sign in to comment.