-
Notifications
You must be signed in to change notification settings - Fork 15
Support implementation of architecture_spec config. #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3b32f7b
Support implementation of architecture_spec config.
n0thingNoob 3868937
Refactor code style: convert variables to snake_case and fix comments
n0thingNoob 8b0fe95
Combine all configure Supported Operation
n0thingNoob 9c51fd7
test modified by adding a test
n0thingNoob adc01bb
Merge branch 'main' into architecture_spec
n0thingNoob 31c15f3
adding architecture spec to tests
n0thingNoob 3eb9d0a
Adding port override for tiles
n0thingNoob 57315e0
Fix some comments
n0thingNoob d803c06
Adding base topology support
n0thingNoob 629ddb6
Merge branch 'main' into architecture_spec
n0thingNoob a7c8096
fix comments
n0thingNoob 2f79da4
Merge branch 'architecture_spec' of github.com:coredac/dataflow into …
n0thingNoob 31b8229
Merge remote-tracking branch 'origin/main' into architecture_spec
n0thingNoob 016ed4a
Add spec to fusion test
n0thingNoob 49d3e5e
modify the test.mlir spec path
n0thingNoob 97be637
fix variable name
n0thingNoob 4bb9a06
rename test_architecture_spec
n0thingNoob 80d7624
modify the arch spec path for fusion
n0thingNoob 7dc8158
Fix link storage safety issue and improve code comments
n0thingNoob 4355b9f
Fix remaining comment formatting issues
n0thingNoob b59a4e4
Change tile container to map, modify the comments format
n0thingNoob f9c7787
Simplify function unit creation by using post-increment operator
n0thingNoob 2e8d575
Move architecture.yaml to test/arch_spec/arch_spec_example.yaml
n0thingNoob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,65 @@ | ||
| #ifndef NEURA_ARCHITECTURE_SPEC_H | ||
| #define NEURA_ARCHITECTURE_SPEC_H | ||
|
|
||
| #include <string> | ||
| #include <vector> | ||
|
|
||
| namespace mlir { | ||
| namespace neura { | ||
|
|
||
| // Enumeration for base topology types | ||
tancheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| enum class BaseTopology { | ||
| MESH, // 4-connected mesh (N, S, W, E) | ||
| KING_MESH, // 8-connected mesh (N, S, W, E, NE, NW, SE, SW) | ||
| RING // Ring topology (only outer boundary connections) | ||
| }; | ||
|
|
||
| // Structure to hold tile default configuration | ||
tancheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| struct TileDefaults { | ||
| int num_registers = 64; // default value | ||
| std::vector<std::string> default_ports = {"N", "S", "W", "E"}; // default ports | ||
| std::vector<std::string> operations = {"add", "mul", "sub"}; // default operations | ||
tancheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
| // Structure to hold memory configuration | ||
tancheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| struct MemoryConfig { | ||
| int capacity = -1; // Memory capacity in bytes | ||
| }; | ||
|
|
||
| // Structure to hold tile override configuration | ||
| struct TileOverride { | ||
| int id = -1; | ||
| int x = -1, y = -1; | ||
| std::vector<std::string> operations; | ||
| int num_registers = -1; | ||
| std::vector<std::string> ports; | ||
| MemoryConfig memory; | ||
| }; | ||
|
|
||
| // Structure to hold link default configuration | ||
| struct LinkDefaults { | ||
| int latency = 1; // default latency | ||
| int bandwidth = 32; // default bandwidth | ||
| }; | ||
|
|
||
| // Structure to hold link override configuration | ||
| struct LinkOverride { | ||
| int id = -1; | ||
| int latency = -1; | ||
| int bandwidth = -1; | ||
| int src_tile_id = -1; | ||
| int dst_tile_id = -1; | ||
| bool existence = true; | ||
| }; | ||
|
|
||
| // Function to get the architecture specification file path | ||
| // This is set by the command line tool when a YAML file is provided | ||
| std::string getArchitectureSpecFile(); | ||
|
|
||
| // Function to get tile defaults configuration | ||
| TileDefaults getTileDefaults(); | ||
|
|
||
| } // namespace neura | ||
| } // namespace mlir | ||
|
|
||
| #endif // NEURA_ARCHITECTURE_SPEC_H | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.