The following code does not work because of Check_FissionLoop
@proc
def blur(g : R[100], inp: R[102]):
f : R[101]
for j in seq(0, 101):
f[j] = inp[j] + inp[j+1]
for i in seq(0, 100):
g[i] = f[i] + f[i+1]
print("This is original blur")
print(blur)
blur = add_loop(blur, 'for j in _:_ #0', 'i', 100)
print(blur)
blur = fusion(blur, 'for i in _:_ #0', 'for i in _:_ #1')
print(blur)
This is original blur
def blur(g: R[100] @ DRAM, inp: R[102] @ DRAM):
f: R[101] @ DRAM
for j in seq(0, 101):
f[j] = inp[j] + inp[j + 1]
for i in seq(0, 100):
g[i] = f[i] + f[i + 1]
def blur(g: R[100] @ DRAM, inp: R[102] @ DRAM):
f: R[101] @ DRAM
for i in seq(0, 100):
for j in seq(0, 101):
f[j] = inp[j] + inp[j + 1]
for i in seq(0, 100):
g[i] = f[i] + f[i + 1]
Traceback (most recent call last):
File "/home/yuka/.local/bin/exocc", line 8, in <module>
sys.exit(main())
File "/home/yuka/.local/lib/python3.9/site-packages/exo/main.py", line 37, in main
library = [
File "/home/yuka/.local/lib/python3.9/site-packages/exo/main.py", line 40, in <listcomp>
for proc in get_procs_from_module(load_user_code(mod))
File "/home/yuka/.local/lib/python3.9/site-packages/exo/main.py", line 69, in load_user_code
loader.exec_module(user_module)
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/yuka/exo/blur.py", line 22, in <module>
blur = fusion(blur, 'for i in _:_ #0', 'for i in _:_ #1')
File "/home/yuka/.local/lib/python3.9/site-packages/exo/API_scheduling.py", line 101, in __call__
return self.func(*bound_args.args, **bound_args.kwargs)
File "/home/yuka/.local/lib/python3.9/site-packages/exo/API_scheduling.py", line 1743, in fusion
return SCHED(proc_c, s1, s2).result()
File "/home/yuka/.local/lib/python3.9/site-packages/exo/LoopIR_scheduling.py", line 2818, in __init__
Check_FissionLoop(self.proc, loop, body1, body2)
File "/home/yuka/.local/lib/python3.9/site-packages/exo/new_eff.py", line 1383, in Check_FissionLoop
raise SchedulingError(f"Cannot fission loop over {i} at {loop.srcinfo}.")
exo.new_eff.SchedulingError: <<<unknown directive>>>: Cannot fission loop over i at /home/yuka/exo/blur.py:13:4.
Potentially a paper idea?
The following code does not work because of
Check_FissionLoop