From 786153bc496081fff41ed65a3a039e078dc0af31 Mon Sep 17 00:00:00 2001 From: cpuhrsch Date: Wed, 25 Oct 2023 20:45:15 -0700 Subject: [PATCH] vit_h batch size 1 and batch size 8 results (#52) --- experiments/eval_combo.py | 2 -- .../{results => p4d_results}/results_bs1.csv | 0 experiments/p4d_results/results_bs1_vit_h.csv | 8 ++++++++ .../{results => p4d_results}/results_bs32.csv | 0 .../results_bs32_vit_h.csv | 0 .../{results => p4d_results}/results_bs8.csv | 0 experiments/p4d_results/results_bs8_vit_h.csv | 9 +++++++++ .../configs/flash_4_configs_a100.p | Bin 2299 -> 2488 bytes .../configs/int_mm_configs_a100.p | Bin 6734 -> 7460 bytes 9 files changed, 17 insertions(+), 2 deletions(-) rename experiments/{results => p4d_results}/results_bs1.csv (100%) create mode 100644 experiments/p4d_results/results_bs1_vit_h.csv rename experiments/{results => p4d_results}/results_bs32.csv (100%) rename experiments/{results => p4d_results}/results_bs32_vit_h.csv (100%) rename experiments/{results => p4d_results}/results_bs8.csv (100%) create mode 100644 experiments/p4d_results/results_bs8_vit_h.csv diff --git a/experiments/eval_combo.py b/experiments/eval_combo.py index edfbb08..55b0813 100644 --- a/experiments/eval_combo.py +++ b/experiments/eval_combo.py @@ -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( diff --git a/experiments/results/results_bs1.csv b/experiments/p4d_results/results_bs1.csv similarity index 100% rename from experiments/results/results_bs1.csv rename to experiments/p4d_results/results_bs1.csv diff --git a/experiments/p4d_results/results_bs1_vit_h.csv b/experiments/p4d_results/results_bs1_vit_h.csv new file mode 100644 index 0000000..8879bbf --- /dev/null +++ b/experiments/p4d_results/results_bs1_vit_h.csv @@ -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 diff --git a/experiments/results/results_bs32.csv b/experiments/p4d_results/results_bs32.csv similarity index 100% rename from experiments/results/results_bs32.csv rename to experiments/p4d_results/results_bs32.csv diff --git a/experiments/results/results_bs32_vit_h.csv b/experiments/p4d_results/results_bs32_vit_h.csv similarity index 100% rename from experiments/results/results_bs32_vit_h.csv rename to experiments/p4d_results/results_bs32_vit_h.csv diff --git a/experiments/results/results_bs8.csv b/experiments/p4d_results/results_bs8.csv similarity index 100% rename from experiments/results/results_bs8.csv rename to experiments/p4d_results/results_bs8.csv diff --git a/experiments/p4d_results/results_bs8_vit_h.csv b/experiments/p4d_results/results_bs8_vit_h.csv new file mode 100644 index 0000000..e6d83d5 --- /dev/null +++ b/experiments/p4d_results/results_bs8_vit_h.csv @@ -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 diff --git a/segment_anything_fast/configs/flash_4_configs_a100.p b/segment_anything_fast/configs/flash_4_configs_a100.p index 3da124ef076d82c1764e39bf3a08d32111cb71e8..33f02da5156545b84d6f6de0d1aea899cef3af14 100644 GIT binary patch delta 109 zcmew@xI>t=fo1Ai&W)^JIQ%p+m^HjPyajw21iTwcrnF88nnHodWC8XxZU=7%Zx(OH Ik}0Kn06BRerT_o{ delta 17 YcmdlX{9BN_%31smbrfIVKyks_OVE%=Bg8Z=2FOC1?te;mz1KC4(7R(3{bl z0V+1xkz07Oy%aB0v*_drq5>eblMPvgB|+w}Ld-$Z0u-C9FD1*S0W_4M0jN-XvMY;# zK9KFpAOf>h1ZpdiAlwMB7_t%TS=6CMiAVqqLAMg5o^`S#uL4w&x(?Vb3?G8jK?RZQ Tg82~Hy