Skip to content
Open
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
11 changes: 11 additions & 0 deletions fhe-cmplr/ckks/src/dfg_region_builder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,17 @@ void REGION_BUILDER::Opt_mul_depth() {
Unify_mul_depth(scc_list);
}
}

// 3, traversal all scc node to
// place input cipher(have no predecessor) at region 1
for (SCC_CONTAINER::NODE_ITER scc_iter = scc_cntr->Begin_node();
scc_iter != scc_cntr->End_node(); ++scc_iter) {
uint32_t mul_depth = Mul_depth(scc_iter->Id());
if (mul_depth == INVALID_MUL_DEPTH) continue;
if (scc_iter->Begin_pred() == scc_iter->End_pred()){
Set_mul_depth(scc_iter->Id(), 1);
}
}
}

//! @brief Create regions. REGION_ELEMs with the same mul_depth are grouped
Expand Down
9 changes: 0 additions & 9 deletions fhe-cmplr/ckks/src/resbm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ void RESBM::Cal_min_laten_plan() {

REGION_ID src(src_id);
if (src_id != 1 && Context()->Plan(src) == nullptr) continue;
// filter regions that require excessive bootstrapping.
if (Context()->Min_cut(src, Context()->Max_bts_lvl(), MIN_CUT_BTS).Size() >
Context()->Max_bts_cnt())
continue;

double src_min_laten = Context()->Total_latency(src);
AIR_ASSERT_MSG(src_min_laten < MAX_LATENCY,
Expand All @@ -82,11 +78,6 @@ void RESBM::Cal_min_laten_plan() {
for (uint32_t dst_id = src_id + min_bts_level;
dst_id < Region_cntr()->Region_cnt(); ++dst_id) {
REGION_ID dst(dst_id);
// filter regions that require excessive bootstrapping.
if (Context()
->Min_cut(dst, Context()->Max_bts_lvl(), MIN_CUT_BTS)
.Size() > Context()->Max_bts_cnt())
continue;

SCALE_MGR scale_mgr(Context(), Region_cntr(), src, dst, consumable_level);
MIN_LATENCY_PLAN* plan = scale_mgr.Perform();
Expand Down
24 changes: 24 additions & 0 deletions model/hemult2.onnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pytorch2.3.1:�
"
x0
x1/Mul_output_0/Mul"Mul
(
/Mul_output_0
x2output/Mul_1"Mul
main_graphZ
x0


Z
x1


Z
x2


b
output


B
Expand Down