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
3 changes: 2 additions & 1 deletion benchmark/scripts/scanACol/config_BCoAMM.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BetaCoOccurringFD.pt,String
ptFile,torchscripts/BetaCoOccurringFD.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanACol/config_BerCRS.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BernoulliCRS.pt,String
ptFile,torchscripts/BernoulliCRS.pt,String
forceMP,1,U64
8 changes: 0 additions & 8 deletions benchmark/scripts/scanACol/config_CPPCRS.csv

This file was deleted.

3 changes: 2 additions & 1 deletion benchmark/scripts/scanACol/config_CRS.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CRS.pt,String
ptFile,torchscripts/CRS.pt,String
forceMP,1,U64
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CRS.pt,String
ptFile,torchscripts/CRSV2.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanACol/config_CoAMM.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CoOccurringFD.pt,String
ptFile,torchscripts/CoOccurringFD.pt,String
forceMP,1,U64
1 change: 1 addition & 0 deletions benchmark/scripts/scanACol/config_CounterSketch.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CountSketch.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanACol/config_EWS.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/EWS.pt,String
ptFile,torchscripts/EWS.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanACol/config_RAWMM.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/RAWMM.pt,String
ptFile,torchscripts/RAWMM.pt,String
forceMP,1,U64
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BetaCoOccurringFD.pt,String
ptFile,torchscripts/TugOfWar.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanACol/config_WCR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/WeightedCR.pt,String
ptFile,torchscripts/WeightedCR.pt,String
forceMP,1,U64
15 changes: 8 additions & 7 deletions benchmark/scripts/scanACol/drawTogether.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ def main():
exeSpace = os.path.abspath(os.path.join(os.getcwd(), "../..")) + "/"
commonBase = os.path.abspath(os.path.join(os.getcwd(), "../..")) + "/results/" + scanTag + "/"
figPath = os.path.abspath(os.path.join(os.getcwd(), "../..")) + "/figures/" + scanTag
methodTags = ["FD-AMM", "Co-AMM", "BCo-AMM", "Couter-sketch", "MM"]
resultPaths = ["fd", "co", "co", "cs", "mm"]
csvTemplates = ["config_FDAMM.csv", "config_CoAMM.csv", "config_BCoAMM.csv", "config_CounterSketch.csv",
"config_RAWMM.csv"]
methodTags = ["Co-AMM", "BCo-AMM", "Count-sketch", "Tug-of-War", "MM"]
resultPaths = ["co", "co", "cs", "tow", "mm"]
csvTemplates = ["config_CoAMM.csv", "config_BCoAMM.csv", "config_CounterSketch.csv",
"config_TugOfWar.csv", "config_RAWMM.csv"]
valueVec = [100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000]
valueVecDisp = np.array(valueVec)
# run
Expand All @@ -153,9 +153,10 @@ def main():
figPath + "/" + scanTag + "sketch_cacheMiss",
True)
# sampling
resultPaths = ["crs", "bcrs", "ews", "mm"]
csvTemplates = ["config_CRS.csv", "config_BerCRS.csv", "config_EWS.csv", "config_RAWMM.csv"]
methodTags = ["CRS", "Ber-CRS", "EWS", "MM"]
resultPaths = ["crs", "crsv2", "bcrs", "wcr", "ews", "mm"]
csvTemplates = ["config_CRS.csv", "config_CRSV2.csv", "config_BerCRS.csv", "config_WCR.csv",
"config_EWS.csv", "config_RAWMM.csv"]
methodTags = ["CRS", "CRSV2", "Ber-CRS", "Weighted-CR", "EWS", "MM"]
elapsedTimeAll, cacheMissAll, periodAll = compareMethod(exeSpace, commonBase, resultPaths, csvTemplates, valueVec,
reRun)
groupLine.DrawFigure(periodAll, elapsedTimeAll,
Expand Down
10 changes: 10 additions & 0 deletions benchmark/scripts/scanAColCPP/config_CPPBCOOFD.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
key,value,type
aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BetaCoOccurringFD.pt,String
useCPP,1,U64
cppAlgoTag,bcooFD,String
threads,1,U64
forceMP,1,U64
10 changes: 10 additions & 0 deletions benchmark/scripts/scanAColCPP/config_CPPBCRS.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
key,value,type
aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BernoulliCRS.pt,String
useCPP,1,U64
cppAlgoTag,bcrs,String
threads,1,U64
forceMP,1,U64
10 changes: 10 additions & 0 deletions benchmark/scripts/scanAColCPP/config_CPPCRSV2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
key,value,type
aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CRSV2.pt,String
useCPP,1,U64
cppAlgoTag,crsV2,String
threads,1,U64
forceMP,1,U64
10 changes: 10 additions & 0 deletions benchmark/scripts/scanAColCPP/config_CPPINT8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
key,value,type
aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/FDAMM.pt,String
useCPP,1,U64
cppAlgoTag,int8,String
threads,1,U64
forceMP,1,U64
9 changes: 9 additions & 0 deletions benchmark/scripts/scanAColCPP/config_CPPSMPPCA.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
threads,1,U64
ptFile,torchscripts/WeightedCR.pt,String
useCPP,1,U64
cppAlgoTag,smp-pca,String
9 changes: 9 additions & 0 deletions benchmark/scripts/scanAColCPP/config_CPPWeightedCR.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
threads,1,U64
ptFile,torchscripts/WeightedCR.pt,String
useCPP,1,U64
cppAlgoTag,weighted-cr,String
6 changes: 0 additions & 6 deletions benchmark/scripts/scanAColCPP/config_CoAMM.csv

This file was deleted.

6 changes: 0 additions & 6 deletions benchmark/scripts/scanAColCPP/config_CounterSketch.csv

This file was deleted.

6 changes: 0 additions & 6 deletions benchmark/scripts/scanAColCPP/config_EWS.csv

This file was deleted.

6 changes: 0 additions & 6 deletions benchmark/scripts/scanAColCPP/config_FDAMM.csv

This file was deleted.

6 changes: 0 additions & 6 deletions benchmark/scripts/scanAColCPP/config_RAWMM.csv

This file was deleted.

6 changes: 0 additions & 6 deletions benchmark/scripts/scanAColCPP/config_WCR.csv

This file was deleted.

48 changes: 36 additions & 12 deletions benchmark/scripts/scanAColCPP/drawTogether.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ def main():
exeSpace = os.path.abspath(os.path.join(os.getcwd(), "../..")) + "/"
commonBase = os.path.abspath(os.path.join(os.getcwd(), "../..")) + "/results/" + scanTag + "/"
figPath = os.path.abspath(os.path.join(os.getcwd(), "../..")) + "/figures/" + scanTag + "CPP"
methodTags = ["FD-AMM", "Co-AMM", "BCo-AMM", "Couter-sketch", "MM"]
resultPaths = ["fd", "co", "co", "cs", "mm"]
csvTemplates = ["config_FDAMM.csv", "config_CoAMM.csv", "config_BCoAMM.csv", "config_CounterSketch.csv",
"config_RAWMM.csv"]
valueVec = [100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000]
methodTags = ["Co-AMM", "BCo-AMM", "Count-sketch", "Tug-of-War", "SMP-PCA", "MM"]
resultPaths = ["co", "co", "cs", "tow", "smp-pca", "mm"]
csvTemplates = ["config_CPPCOFD.csv", "config_CPPBCOOFD.csv", "config_CPPCOUNTERSKETCH.csv",
"config_CPPTOW.csv", "config_CPPSMPPCA.csv", "config_CPPMM.csv"]
valueVec = [100, 200, 500, 1000, 5000, 10000, 20000, 50000]
valueVecDisp = np.array(valueVec)
# run
reRun = 0
Expand All @@ -150,26 +150,50 @@ def main():
os.system("sudo rm -rf " + commonBase)
os.system("sudo mkdir " + commonBase)
reRun = 1

# skech
elapsedTimeAll, cacheMissAll, periodAll, fro, eb = compareMethod(exeSpace, commonBase, resultPaths, csvTemplates, valueVec,
reRun)
groupLine.DrawFigure(periodAll, elapsedTimeAll,
methodTags,
"#elements in A's col", "elapsed time (ms)", 0, 1,
figPath + "/" + scanTag + "sketch_cpp_elapsedTime",
True)
groupLine.DrawFigureYnormal(periodAll, cacheMissAll,
methodTags,
"#elements in A's col", "cacheMiss (%)", 0, 1,
figPath + "/" + scanTag + "sketch_cpp_cacheMiss",
True)
groupLine.DrawFigureYnormal(periodAll,
fro * 100.0,
methodTags,
"#A's row", "normalized error %", 0, 100, figPath + "/" +scanTag +
"sketch_cpp_froError",
True)
groupLine.DrawFigureYnormal(periodAll,
eb * 100.0,
methodTags,
"#A's row", "error bound ratio %", 0, 100, figPath + "/" + scanTag
+ "sketch_cpp_ebRatio",
True)
# sampling
# sampling
# resultPaths = ["crs", "bcrs", "ews", "mm","mm-cpp","crs-cpp"]
resultPaths = ["mm", "crs","ews","counterSketch","cofd","tow"]
csvTemplates = ["config_CPPMM.csv", "config_CPPCRS.csv","config_CPPEWS.csv","config_CPPCOUNTERSKETCH.csv","config_CPPCOFD.csv","config_CPPTOW.csv"]
methodTags = ["mm", "crs","ews","counterSketch","cofd","tow"]
resultPaths = ["crs", "crsv2", "bcrs", "wcr", "ews", "int8", "mm"]
csvTemplates = ["config_CPPCRS.csv", "config_CPPCRSV2.csv", "config_CPPBCRS.csv", "config_CPPWeightedCR.csv",
"config_CPPEWS.csv", "config_CPPINT8.csv", "config_CPPMM.csv"]
methodTags = ["CRS", "CRSV2", "Ber-CRS", "Weighted-CR", "EWS", "INT8", "MM"]
# csvTemplates = ["config_CRS.csv", "config_BerCRS.csv", "config_EWS.csv", "config_RAWMM.csv","config_CPPMM.csv","config_CPPCRS.csv"]
# methodTags = ["CRS", "Ber-CRS", "EWS",, "MM","MM_CPP","CRS_CPP"]
elapsedTimeAll, cacheMissAll, periodAll,fro,eb = compareMethod(exeSpace, commonBase, resultPaths, csvTemplates, valueVec,
reRun)
groupLine.DrawFigure(periodAll, elapsedTimeAll,
methodTags,
"#A's col", "elapsed time (ms)", 0, 1,
figPath + "/" + scanTag + "cpp_elapsedTime",
figPath + "/" + scanTag + "sampling_cpp_elapsedTime",
True)
groupLine.DrawFigureYnormal(periodAll, cacheMissAll,
methodTags,
"#A's col", "cacheMiss (%)", 0, 1,
figPath + "/" + scanTag + "cpp_cacheMiss",
figPath + "/" + scanTag + "sampling_cpp_cacheMiss",
True)
groupLine.DrawFigureYnormal(periodAll,
fro * 100.0,
Expand Down
3 changes: 2 additions & 1 deletion benchmark/scripts/scanARow/config_BCoAMM.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BetaCoOccurringFD.pt,String
ptFile,torchscripts/BetaCoOccurringFD.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanARow/config_BerCRS.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BernoulliCRS.pt,String
ptFile,torchscripts/BernoulliCRS.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanARow/config_CRS.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CRS.pt,String
ptFile,torchscripts/CRS.pt,String
forceMP,1,U64
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/FDAMM.pt,String
ptFile,torchscripts/CRSV2.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanARow/config_CoAMM.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CoOccurringFD.pt,String
ptFile,torchscripts/CoOccurringFD.pt,String
forceMP,1,U64
1 change: 1 addition & 0 deletions benchmark/scripts/scanARow/config_CounterSketch.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/CountSketch.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanARow/config_EWS.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/EWS.pt,String
ptFile,torchscripts/EWS.pt,String
forceMP,1,U64
6 changes: 0 additions & 6 deletions benchmark/scripts/scanARow/config_FDAMM.csv

This file was deleted.

3 changes: 2 additions & 1 deletion benchmark/scripts/scanARow/config_RAWMM.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/RAWMM.pt,String
ptFile,torchscripts/RAWMM.pt,String
forceMP,1,U64
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,1000,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/BernoulliCRS.pt,String
ptFile,torchscripts/TugOfWar.pt,String
forceMP,1,U64
3 changes: 2 additions & 1 deletion benchmark/scripts/scanARow/config_WCR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ aRow,100,U64
aCol,1000,U64
bCol,500,U64
sketchDimension,25,U64
ptFile,torchscripts/WeightedCR.pt,String
ptFile,torchscripts/WeightedCR.pt,String
forceMP,1,U64
Loading