Skip to content

Commit

Permalink
vit_h batch size 1 and batch size 8 results (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpuhrsch authored Oct 26, 2023
1 parent 3bd7461 commit 786153b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 2 deletions.
2 changes: 0 additions & 2 deletions experiments/eval_combo.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ def build_results_batch(predictor, batch, batch_size, pad_input_image_batch):
predictor.features = features
predictor.is_image_set = True
coords = coords.unsqueeze(1)
# TODO: Should exclude this from the timed region as well?
# Might explain a dip in larger batch sizes for vit_b without NT
fg_labels = torch.ones(
(coords.size(0), 1), dtype=torch.int, device=device)
masks, scores, logits = predictor.predict_torch(
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions experiments/p4d_results/results_bs1_vit_h.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
technique,time,sam_commit_name,pytorch_version,sam_model_type,batch_size,memory(MiB),memory(%),img_s(avg),batch_ms(avg)/batch_size,mIoU,use_compile,use_half,compress,epilogue_fusion_first,use_compile_decoder,use_nested_tensor,use_rel_pos,pad_input_image_batch,num_workers,num_batches,num_images,profile_path,memory_path
fp32,35.23240319093068,default,2.2.0.dev20231024+cu121,vit_h,1,5758,14,2.65870772568268,376.1225765209783,0.584173340367447,False,None,None,False,False,False,True,True,32,4952,4952,None,None
bf16,7.502882464726766,codesign,2.2.0.dev20231024+cu121,vit_h,1,2886,7,13.45076982255068,74.34518716716612,0.580705424101227,False,torch.bfloat16,None,False,False,False,True,True,32,4952,4952,None,None
compile,6.757023398081461,codesign,2.2.0.dev20231024+cu121,vit_h,1,2832,6,18.488662613774757,54.087200404369,0.5812414398978033,max-autotune,torch.bfloat16,None,False,False,False,True,True,32,4952,4952,None,None
SDPA,6.168465121587118,sdpa-decoder,2.2.0.dev20231024+cu121,vit_h,1,2517,6,20.26718162443607,49.340851556503715,0.5811542724237428,max-autotune,torch.bfloat16,None,False,False,False,True,True,32,4952,4952,None,None
Triton,6.0584907333056135,local-fork,2.2.0.dev20231024+cu121,vit_h,1,2517,6,20.76397793545598,48.160328580027446,0.5821862905931964,max-autotune,torch.bfloat16,None,False,False,False,True,True,32,4952,4952,None,None
int8,1.8060946822166444,local-fork,2.2.0.dev20231024+cu121,ERROR
sparse,6.413145796457926,local-fork,2.2.0.dev20231024+cu121,vit_h,1,5286,13,22.45630994267693,44.53091369653557,0.5294066301420467,max-autotune,torch.bfloat16,sparse,False,False,False,True,True,32,4952,4952,None,None
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions experiments/p4d_results/results_bs8_vit_h.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
technique,time,sam_commit_name,pytorch_version,sam_model_type,batch_size,memory(MiB),memory(%),img_s(avg),batch_ms(avg)/batch_size,mIoU,use_compile,use_half,compress,epilogue_fusion_first,use_compile_decoder,use_nested_tensor,use_rel_pos,pad_input_image_batch,num_workers,num_batches,num_images,profile_path,memory_path
fp32,33.77061091264089,default,2.2.0.dev20231024+cu121,vit_h,8,28806,71,2.7820335945039893,359.44928989194705,0.584173340367447,False,None,None,False,False,False,True,True,32,619,4952,None,None
bf16,6.822473649183909,codesign,2.2.0.dev20231024+cu121,vit_h,8,14424,35,14.850424350893103,67.33814309756475,0.5809121174676433,False,torch.bfloat16,None,False,False,False,True,True,32,619,4952,None,None
compile,7.968364950021108,codesign,2.2.0.dev20231024+cu121,vit_h,8,12358,30,19.69605657526638,50.77158446304247,0.5811320849834102,max-autotune,torch.bfloat16,None,False,False,False,True,True,32,619,4952,None,None
SDPA,5.843019040425618,sdpa-decoder,2.2.0.dev20231024+cu121,vit_h,8,7947,19,21.92026495560376,45.61988653081299,0.581191777206921,max-autotune,torch.bfloat16,None,False,False,False,True,True,32,619,4952,None,None
Triton,9.09047209819158,local-fork,2.2.0.dev20231024+cu121,vit_h,8,4550,11,22.874989934428537,43.71586623060877,0.5820036887609843,max-autotune,torch.bfloat16,None,False,False,False,True,True,32,619,4952,None,None
NT,5.455243261655172,local-fork,2.2.0.dev20231024+cu121,vit_h,8,4550,11,23.206823845253847,43.09077393219044,0.5809004559961229,max-autotune,torch.bfloat16,None,False,False,True,True,True,32,619,4952,None,None
int8,8.623369554678598,local-fork,2.2.0.dev20231024+cu121,vit_h,8,3239,7,25.099473512089347,39.841473149559995,0.5820724009353484,max-autotune,torch.bfloat16,dynamic_quant,False,False,True,True,True,32,619,4952,None,None
sparse,5.597406772772471,local-fork,2.2.0.dev20231024+cu121,vit_h,8,7055,17,24.900183397177024,40.16034677533225,0.5289167514647479,max-autotune,torch.bfloat16,sparse,False,False,True,True,True,32,619,4952,None,None
Binary file modified segment_anything_fast/configs/flash_4_configs_a100.p
Binary file not shown.
Binary file modified segment_anything_fast/configs/int_mm_configs_a100.p
Binary file not shown.

0 comments on commit 786153b

Please sign in to comment.