-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add snax alu config * Add streamer-alu snakefile * Makefile * Move streamer_alu to snakemake ci
- Loading branch information
1 parent
9d7aabc
commit 18c12fc
Showing
6 changed files
with
94 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
from util.snake.configs import get_snax_alu_config | ||
|
||
config = get_snax_alu_config() | ||
config["snaxoptflags"] = ",".join( | ||
[ | ||
"insert-accfg-op{accelerator=snax_alu}", | ||
"convert-linalg-to-kernel", | ||
"dispatch-kernels", | ||
"test-insert-debugs", | ||
"set-memory-space", | ||
"set-memory-layout", | ||
"test-insert-debugs", | ||
"realize-memref-casts", | ||
"reuse-memref-allocs", | ||
"insert-sync-barrier", | ||
"dispatch-regions", | ||
"convert-linalg-to-stream", | ||
"convert-stream-to-snax-stream", | ||
"convert-linalg-to-accfg", | ||
"convert-accfg-to-csr", | ||
"snax-copy-to-dma", | ||
"memref-to-snax", | ||
"snax-to-func", | ||
"test-debug-to-func", | ||
"clear-memory-space", | ||
] | ||
) | ||
|
||
|
||
module default_rules: | ||
snakefile: | ||
"../../util/snake/default_rules.smk" | ||
config: | ||
config | ||
|
||
|
||
use rule * from default_rules as default_* | ||
|
||
|
||
# Rules | ||
rule all: | ||
input: | ||
"streamer_add.x", | ||
"streamer_add_stream.x", | ||
run: | ||
for item in input: | ||
shell("{config[vltsim]} {item}") | ||
|
||
|
||
from gendata import create_data_files | ||
|
||
|
||
rule generate_data: | ||
output: | ||
"data.c", | ||
"data.h", | ||
run: | ||
create_data_files() | ||
|
||
|
||
rule compile_simple_main: | ||
input: | ||
"main.c", | ||
"data.o", | ||
output: | ||
temp("main.o"), | ||
shell: | ||
"{config[cc]} {config[cflags]} -c {input} -o {output}" | ||
|
||
|
||
rule link_snax_binary: | ||
input: | ||
"{file}.o", | ||
"data.o", | ||
"main.o", | ||
output: | ||
"{file}.x", | ||
shell: | ||
"{config[ld]} {config[ldflags]} {input} -o {output}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters