Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pkg_tar(
"//core/lowering:include",
"//core/lowering/passes:include",
"//core/partitioning:include",
"//core/partitioning/segmentedblock:include",
"//core/partitioning/partitioninginfo:include",
"//core/partitioning/partitioningctx:include",
"//core/partitioning/partitioninginfo:include",
"//core/partitioning/segmentedblock:include",
"//core/plugins:impl_include",
"//core/plugins:include",
"//core/runtime:include",
Expand Down
17 changes: 12 additions & 5 deletions core/lowering/passes/unpack_var.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ void UnpackVar(std::shared_ptr<torch::jit::Graph>& graph) {
%var: Tensor = aten::sub(%sqrdmean, %meansqrd, %1)
%varout : Tensor = prim::If(%unbiased)
block0():
%shape: int[] = aten::size(%input)
%shapet: Tensor = aten::tensor(%shape, %f32_dtype, %none, %false)
%dim: int = prim::ListUnpack(%dims)
%reduceddims: Tensor = aten::select(%shapet, %0, %dim)
%numel: Tensor = aten::prod(%reduceddims, %dim, %keepdim, %none)
# Compute number of elements in original input tensor
%originalshape: int[] = aten::size(%input)
%originalshapet: Tensor = aten::tensor(%originalshape, %f32_dtype, %none, %false)
%originalnumel: Tensor = aten::prod(%originalshapet, %0, %false, %none)
# Compute number of elements in resulting output tensor
%resultingshape: int[] = aten::size(%var)
%resultingshapet: Tensor = aten::tensor(%resultingshape, %f32_dtype, %none, %false)
%resultingnumel: Tensor = aten::prod(%resultingshapet, %0, %false, %none)
# Quotient of original number of elements and resulting number of elements
# is equal to the number of elements used per variance calculation
%numel: Tensor = aten::div(%originalnumel, %resultingnumel)
# Perform Bessel's correction on computed variance
%mul: Tensor = aten::mul(%var, %numel)
%sub: Tensor = aten::sub(%numel, %1, %1)
%v: Tensor = aten::div(%mul, %sub)
Expand Down
2 changes: 2 additions & 0 deletions core/partitioning/shape_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ void getSegmentsOutputByRunning(
jit_inputs_ivalues.push_back(ivalues_maps[input].toInt());
} else if (input->type()->isSubtypeOf(torch::jit::BoolType::get())) {
jit_inputs_ivalues.push_back(ivalues_maps[input].toBool());
} else if (input->type()->isSubtypeOf(torch::jit::FloatType::get())) {
jit_inputs_ivalues.push_back(ivalues_maps[input].toDouble());
} else if (input->type()->kind() == torch::jit::TypeKind::ListType) {
// create list
jit_inputs_ivalues.push_back(ivalues_maps[input].toList());
Expand Down
2 changes: 1 addition & 1 deletion docs/_cpp_api/classtorch__tensorrt_1_1DataType.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_cpp_api/classtorch__tensorrt_1_1TensorFormat.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_cpp_api/dir_cpp.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_cpp_api/dir_cpp_include.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_cpp_api/dir_cpp_include_torch_tensorrt.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_cpp_api/file_cpp_include_torch_tensorrt_ptq.h.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_cpp_api/namespace_torch_tensorrt.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<div class="version">
master (1.3.0a0+71a9db5)
master (1.3.0a0+6bef925)
</div>


Expand Down
Loading