Skip to content

Commit

Permalink
M3500a threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerhh committed Nov 9, 2024
1 parent e170795 commit b144884
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 29 deletions.
18 changes: 9 additions & 9 deletions gtsam/linear/CholeskyEliminationTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void CholeskyEliminationTree::pickRelinKeys(

remainingCycles -= new_factor_cost + backsolve_cost;

// cout << "backsolve cost = " << backsolve_cost << " new_factor_cost = " << new_factor_cost << " remainingCycles = " << remainingCycles << endl;
cout << "backsolve cost = " << backsolve_cost << " new_factor_cost = " << new_factor_cost << " remainingCycles = " << remainingCycles << endl;

if(remainingCycles <= 0) {
cout << "no relin possible!" << endl;
Expand Down Expand Up @@ -658,14 +658,14 @@ void CholeskyEliminationTree::pickRelinKeys(
}
}

// cout << "Remaining cycles: " << remainingCycles
// << " Total relin keys: " << newKeyDeltaVec.size()
// << " num relin: " << newRelinKeys->size()
// << " relin_cost " << total_relin_cost
// << " highest unpicked delta: " << highestUnpickedDelta
// << " force_thresh: " << force_thresh
// << " num_min_force_thresh_keys: " << num_min_force_thresh_keys
// << " total_cost: " << totalCost << endl;
cout << "Remaining cycles: " << remainingCycles
<< " Total relin keys: " << newKeyDeltaVec.size()
<< " num relin: " << newRelinKeys->size()
<< " relin_cost " << total_relin_cost
<< " highest unpicked delta: " << highestUnpickedDelta
<< " force_thresh: " << force_thresh
<< " num_min_force_thresh_keys: " << num_min_force_thresh_keys
<< " total_cost: " << totalCost << endl;

// cout << "Relin keys: ";
// for(auto k : *newRelinKeys) {
Expand Down
6 changes: 6 additions & 0 deletions gtsam/nonlinear/ISAM2-new.bak
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@ ISAM2Result ISAM2::update(const NonlinearFactorGraph& newFactors,
UpdateImpl::ExpmapMasked(delta_, relinKeys, &theta_);
}

// cout << "relinKeys: ";
// for(Key key : relinKeys) {
// cout << key << " ";
// }
// cout << endl;

eTree_.markAffectedKeys(nonlinearFactors_,
result.newFactorsIndices,
relinKeys,
Expand Down
14 changes: 4 additions & 10 deletions scripts/calc_iape.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ cd $EVAL_DIR

python3 calc_iape.py --infiles "
VIO_sphere2_vio_lag-20-LC_sphere2_ape.out
VIOLC_sphere2_vio_lag-20_lc_period-65-LC_sphere2_ape.out
VIOLC_sphere2_vio_lag-20_lc_period-45-LC_sphere2_ape.out
LRU_sphere2_num_threads-1_memsize-1M-LC_sphere2_ape.out
LRU_sphere2_num_threads-1_cpu_memsize-1M-LC_sphere2_ape.out
LRU_sphere2_num_threads-1_cpu_memsize-500K-LC_sphere2_ape.out
RA_sphere2_num_threads-2-LC_sphere2_ape.out
RA_sphere2_num_threads-4-LC_sphere2_ape.out
incremental_sphere2-LC_sphere2_ape.out
"

# LRU_sphere2_num_threads-1_memsize-300K-LC_sphere2_ape.out
# LRU_sphere2_num_threads-1_memsize-400K-LC_sphere2_ape.out
# LRU_sphere2_num_threads-1_memsize-500K-LC_sphere2_ape.out
# LRU_sphere2_num_threads-1_cpu_memsize-400K-LC_sphere2_ape.out
# RA_sphere2_num_threads-1-LC_sphere2_ape.out

python3 calc_iape.py --infiles "
VIO_M3500a_vio_lag-20-LC_M3500a_ape.out
VIOLC_M3500a_vio_lag-20_lc_period-65-LC_M3500a_ape.out
Expand All @@ -47,8 +41,8 @@ python3 calc_iape.py --infiles "
python3 calc_iape.py --infiles "
VIO_CAB7000-smallnoise_vio_lag-20-LC_CAB7000-smallnoise_ape.out
VIOLC_CAB7000-smallnoise_vio_lag-20_lc_period-65-LC_CAB7000-smallnoise_ape.out
LRU_CAB7000-smallnoise_num_threads-1_memsize-1M-LC_CAB7000-smallnoise_ape.out
LRU_CAB7000-smallnoise_num_threads-1_cpu_memsize-1M-LC_CAB7000-smallnoise_ape.out
RA_CAB7000-smallnoise_num_threads-1-LC_CAB7000-smallnoise_ape.out
RA_CAB7000-smallnoise_num_threads-1_cpu-LC_CAB7000-smallnoise_ape.out
RA_CAB7000-smallnoise_num_threads-2-LC_CAB7000-smallnoise_ape.out
RA_CAB7000-smallnoise_num_threads-4-LC_CAB7000-smallnoise_ape.out
incremental_CAB7000-smallnoise-LC_CAB7000-smallnoise_ape.out
Expand Down
2 changes: 1 addition & 1 deletion timing/python/configs/RA_M3500a_num_threads-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dataset:
M3500a:
is3D: false
path: "ra_datasets/M3500a"
relin_thresh: 0.01
relin_thresh: 0.001
start_step: 2
end_step: 3499 # Inclusive
period: 25
Expand Down
2 changes: 1 addition & 1 deletion timing/python/configs/RA_M3500a_num_threads-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dataset:
M3500a:
is3D: false
path: "ra_datasets/M3500a"
relin_thresh: 0.01
relin_thresh: 0.001
start_step: 2
end_step: 3499 # Inclusive
period: 25
Expand Down
2 changes: 1 addition & 1 deletion timing/python/configs/RA_M3500a_num_threads-4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dataset:
M3500a:
is3D: false
path: "ra_datasets/M3500a"
relin_thresh: 0.01
relin_thresh: 0.001
start_step: 2
end_step: 3499 # Inclusive
period: 25
Expand Down
2 changes: 1 addition & 1 deletion timing/python/configs/RA_sphere2_num_threads-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ RA:
# - CAB7000-smallnoise
# - CSAIL
# - sphere2500
# - sphere2
- sphere2
# - w10000
# - M3500
# - M3500c
Expand Down
2 changes: 1 addition & 1 deletion timing/python/configs/RA_sphere2_num_threads-1_cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ LRU:
params:
num_threads: 1
num_threads_file: "" # Specify the path to a num threads file or leave empty
memsize: 1M # In bytes.
memsize: 500K # In bytes.
print_dataset: true # Turn this off if not generating header
print_values: false
print_pred: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ VIO:
gen_header: false
vio_lag: 20
run_lc: true
lc_period: 65
lc_period: 45

# Legacy output directors
Legacy:
Expand Down
9 changes: 5 additions & 4 deletions timing/testGtsamIncremental3D-vio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,12 @@ int main(int argc, char *argv[]) {
vioNewFactors.push_back(measurement);
}
else {
// cout << "discarding factor " << k1 << " " << k2 << " " << vio_lag << endl;
cout << "discarding factor " << k1 << " " << k2 << " " << vio_lag << endl;
}

// cout << "step = " << step << ", k1 = " << k1 << ", k2 = " << k2 << endl;
if(k1 - k2 >= loop_size) {
// cout << "detected loop" << endl;
cout << "detected loop" << endl;
if(loop_start_step == 0) {
loop_start_step = step;
}
Expand Down Expand Up @@ -311,9 +312,9 @@ int main(int argc, char *argv[]) {
}

bool lc_running = false;
// cout << "loop_start_step = " << loop_start_step << " " << step << endl;
cout << "loop_start_step = " << loop_start_step << " " << step << endl;
if(run_lc && loop_start_step != 0 && loop_start_step + lc_period <= step) {
// cout << "lc_running" << endl;
cout << "lc_running" << endl;
lc_running = true;
if(new_loop) {
loop_start_step = step;
Expand Down

0 comments on commit b144884

Please sign in to comment.