Skip to content

Instantly share code, notes, and snippets.

@thomasjpfan
Last active May 23, 2023 14:56
Show Gist options
  • Save thomasjpfan/8717892d17e9d379e979e96c0d693a97 to your computer and use it in GitHub Desktop.
Save thomasjpfan/8717892d17e9d379e979e96c0d693a97 to your computer and use it in GitHub Desktop.
Array API backend results
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
results = pd.read_csv("results_backend.csv")
sns.set_theme(context="paper", font_scale=1.4)
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(8, 4), constrained_layout=True, sharey=True)
sns.barplot(y="backend", x="duration", data=results[results["method"] == "fit"], ax=ax1)
ax1.set_xlabel("duration (sec)")
ax1.set_title("fit")
sns.barplot(y="backend", x="duration", data=results[results["method"] == "predict"], ax=ax2)
ax2.set_xlabel("duration (sec)")
ax2.set_title("predict")
fig.suptitle("LinearDiscriminantAnalysis")
fig.savefig("results_backend.png")
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
duration backend method
8.810645872999885 numpy fit
8.587102982000033 numpy fit
8.609924614000192 numpy fit
8.626463392000005 numpy fit
8.608467103000294 numpy fit
8.605862218999391 numpy fit
8.58534724600031 numpy fit
8.599541786999907 numpy fit
8.61696801800008 numpy fit
8.576224698999795 numpy fit
0.08871091099990736 numpy predict
0.05650611500004743 numpy predict
0.055986266000218166 numpy predict
0.05600439800036838 numpy predict
0.05713565599944559 numpy predict
0.056569228000626026 numpy predict
0.057239217999267566 numpy predict
0.05904736999946181 numpy predict
0.05779621799956658 numpy predict
0.0582447159995354 numpy predict
2.1913781430002928 torch_cpu fit
2.1136891670003024 torch_cpu fit
2.11096386600002 torch_cpu fit
2.1185161840003275 torch_cpu fit
2.1079952070003856 torch_cpu fit
2.1046235730000262 torch_cpu fit
2.1081806709999 torch_cpu fit
2.1231324580003275 torch_cpu fit
2.105008405999797 torch_cpu fit
2.107129447999796 torch_cpu fit
0.04564668300008634 torch_cpu predict
0.045281728000190924 torch_cpu predict
0.04380844199931744 torch_cpu predict
0.043470056000842305 torch_cpu predict
0.04354761700051313 torch_cpu predict
0.04359560900047654 torch_cpu predict
0.04358013799992477 torch_cpu predict
0.04370723000010912 torch_cpu predict
0.04378476199963188 torch_cpu predict
0.04336299499937013 torch_cpu predict
1.6305857569996078 torch_cuda fit
1.286529824000354 torch_cuda fit
1.2996333269993556 torch_cuda fit
1.2970852680000462 torch_cuda fit
1.2934086249997563 torch_cuda fit
1.296390262999921 torch_cuda fit
1.2898022469998978 torch_cuda fit
1.2930832319998444 torch_cuda fit
1.2895233599992935 torch_cuda fit
1.2903313120004896 torch_cuda fit
0.0020639669992306153 torch_cuda predict
0.001711779999823193 torch_cuda predict
0.0017488110006524948 torch_cuda predict
0.0017270009993808344 torch_cuda predict
0.001721020999866596 torch_cuda predict
0.001703330000054848 torch_cuda predict
0.0017148200004157843 torch_cuda predict
0.001706540999293793 torch_cuda predict
0.0017124300002251402 torch_cuda predict
0.0017068600000129663 torch_cuda predict
7.996332292999796 cupy fit
1.0802618310008256 cupy fit
1.0704534280002918 cupy fit
1.0702662650001002 cupy fit
1.0701622730002782 cupy fit
1.0705247719997715 cupy fit
1.069933341000251 cupy fit
1.0698445409998385 cupy fit
1.0655767559992455 cupy fit
1.0633999070005302 cupy fit
0.31758884000009857 cupy predict
0.09424744399984775 cupy predict
0.09413182200023584 cupy predict
0.09410256200044387 cupy predict
0.09428052400016895 cupy predict
0.09408385200003977 cupy predict
0.09407383100005973 cupy predict
0.09409143100037909 cupy predict
0.09409573299944896 cupy predict
0.09407538499999646 cupy predict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment