Skip to content

Commit

Permalink
adding examples/mac_bash
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaybati committed Aug 25, 2023
1 parent e4b84ef commit e665e8c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ graph_scripts/
fLibrary/*.txt
goldenFiles/*/*.txt
randomStuff/
fLibrary/modelCreator.f90
fLibrary/variables.fpp
test/modelCreator.f90
test/variables.fpp
16 changes: 16 additions & 0 deletions examples/run_basic_mac.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e665e8c

Please sign in to comment.