Skip to content

Commit

Permalink
More micro demo dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-melchert committed Oct 31, 2024
1 parent 8d0d140 commit 1b1690c
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@
[submodule "Lego_v0"]
path = Lego_v0
url = https://github.com/sgauthamr2001/Lego_v0.git
[submodule "DSEGraphAnalysis"]
path = DSEGraphAnalysis
url = https://github.com/jack-melchert/DSEGraphAnalysis.git
[submodule "APEX"]
path = APEX
url = https://github.com/jack-melchert/APEX.git
1 change: 1 addition & 0 deletions APEX
Submodule APEX added at dd0bfd
1 change: 0 additions & 1 deletion DSEGraphAnalysis
Submodule DSEGraphAnalysis deleted from 9b3793
15 changes: 15 additions & 0 deletions addshr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from peak import Peak, family_closure
from peak import family
from peak.family import AbstractFamily

@family_closure
def addshr_fc(family: AbstractFamily):
Data = family.BitVector[16]
UInt = family.Unsigned[16]
@family.assemble(locals(), globals())
class addshr(Peak):

def __call__(self, in0: Data, in1: Data, in2: Data) -> Data:
return Data(UInt(in1) + UInt(in0)) >> in2

return addshr
13 changes: 13 additions & 0 deletions apex_demo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if [ "$1" = "mine" ]
then
cd APEX
python dse_graph_analysis.py -f ../Halide-to-Hardware/apps/hardware_benchmarks/apps/gaussian/bin/gaussian_compute.json 20 -f ../Halide-to-Hardware/apps/hardware_benchmarks/apps/harris/bin/harris_compute.json 20 --subgraph-mining-only
cd ..
fi

if [ "$1" = "specialize" ]
then
cd APEX
python dse_graph_analysis.py -f ../Halide-to-Hardware/apps/hardware_benchmarks/apps/gaussian/bin/gaussian_compute.json 1 -f ../Halide-to-Hardware/apps/hardware_benchmarks/apps/harris/bin/harris_compute.json 0 6 -c
cd ..
fi
15 changes: 15 additions & 0 deletions metamapper_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from peak import Peak, family_closure
from peak import family
from peak.family import AbstractFamily

@family_closure
def addshr_fc(family: AbstractFamily):
Data = family.BitVector[16]
UInt = family.Unsigned[16]
@family.assemble(locals(), globals())
class addshr(Peak):

def __call__(self, in0: Data, in1: Data, in2: Data) -> Data:
return Data(UInt(in1) + UInt(in0)) >> in2

return addshr

0 comments on commit 1b1690c

Please sign in to comment.