From e665e8c41730e7cee3b477dec1ea702414d26167 Mon Sep 17 00:00:00 2001 From: ajaybati Date: Fri, 25 Aug 2023 14:28:27 -0400 Subject: [PATCH] adding examples/mac_bash --- .gitignore | 4 ++++ examples/run_basic_mac.sh | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 examples/run_basic_mac.sh diff --git a/.gitignore b/.gitignore index 9b91c1c..1063ab6 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,7 @@ graph_scripts/ fLibrary/*.txt goldenFiles/*/*.txt randomStuff/ +fLibrary/modelCreator.f90 +fLibrary/variables.fpp +test/modelCreator.f90 +test/variables.fpp diff --git a/examples/run_basic_mac.sh b/examples/run_basic_mac.sh new file mode 100755 index 0000000..aef5146 --- /dev/null +++ b/examples/run_basic_mac.sh @@ -0,0 +1,16 @@ +#file to create pytorch model and convert to ONNX +python3 ../goldenFiles/gemm_small/gemm_small.py + +#read and interpret the correspoding output files from last step +python3 modelParserONNX.py -w ../goldenFiles/gemm_small/gemm_small.onnx -f ../goldenFiles/gemm_small/gemm_small_weights.onnx + +#compile the library +make library + +#compile "source files" (capiTester.f90), link to the library file created, and run +gfortran -c ../examples/capiTester.f90 -IobjFiles/ +gfortran -o flibrary libcorelib.a capiTester.o +./flibrary + +#check whether python output from PyTorch model = roseNNa's output +python3 ../test/testChecker.py gemm_small \ No newline at end of file