-
Notifications
You must be signed in to change notification settings - Fork 15
[Refactor] Introduce NeuraAttributes.h to manage attribute constants #241
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 all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c37513f
[Refactor] Introduce NeuraAttributes.h to manage attribute constants
shiyunyao 92bb6a0
Fix CLI option parsing error
shiyunyao b209ad1
add comments to clarify dataflow and mapping modes
shiyunyao 344e97c
add attribute constants(kValue,kConstantValue,kRhsValue,kLhsValue)
shiyunyao 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| #pragma once | ||
|
|
||
| #include "llvm/ADT/StringRef.h" | ||
|
|
||
| namespace mlir { | ||
| namespace neura { | ||
|
|
||
| namespace attr { | ||
|
|
||
| // Attribute Keys | ||
|
|
||
| // Specifies the dataflow representation mode, as opposed to control-flow. | ||
| constexpr llvm::StringLiteral kDataflowMode = "dataflow_mode"; | ||
|
|
||
| // Specifies the mapping strategy mode, can be either 'spatial-only' or | ||
| // 'spatial-temporal'. | ||
| constexpr llvm::StringLiteral kMappingMode = "mapping_mode"; | ||
|
|
||
| constexpr llvm::StringLiteral kMappingStrategy = "mapping_strategy"; | ||
| constexpr llvm::StringLiteral kBacktrackConfig = "backtrack_config"; | ||
| constexpr llvm::StringLiteral kDumpMappingTable = "dump_mapping_table"; | ||
|
|
||
| // Identification & Results | ||
| constexpr llvm::StringLiteral kDfgId = "dfg_id"; | ||
| constexpr llvm::StringLiteral kMappingInfo = "mapping_info"; | ||
| constexpr llvm::StringLiteral kXTiles = "x_tiles"; | ||
| constexpr llvm::StringLiteral kYTiles = "y_tiles"; | ||
| constexpr llvm::StringLiteral kCompiledII = "compiled_ii"; | ||
| constexpr llvm::StringLiteral kRecMII = "rec_mii"; | ||
| constexpr llvm::StringLiteral kResMII = "res_mii"; | ||
|
|
||
| // Values & Constants Keys | ||
| constexpr llvm::StringLiteral kValue = "value"; | ||
| constexpr llvm::StringLiteral kConstantValue = "constant_value"; | ||
| constexpr llvm::StringLiteral kRhsValue = "rhs_value"; | ||
| constexpr llvm::StringLiteral kLhsValue = "lhs_value"; | ||
|
|
||
| // Attribute Values & Constants | ||
| namespace val { | ||
| // Strategy & Mode | ||
| constexpr llvm::StringLiteral kSpatialOnly = "spatial-only"; | ||
| constexpr llvm::StringLiteral kSpatialTemporal = "spatial-temporal"; | ||
| constexpr llvm::StringLiteral kTemporal = "temporal"; | ||
| constexpr llvm::StringLiteral kHeuristic = "heuristic"; | ||
| constexpr llvm::StringLiteral kCustomized = "customized"; | ||
| constexpr llvm::StringLiteral kSimple = "simple"; | ||
| constexpr llvm::StringLiteral kGreedy = "greedy"; | ||
| constexpr llvm::StringLiteral kExhaustive = "exhaustive"; | ||
|
|
||
| // Identifiers | ||
| constexpr llvm::StringLiteral kModeSteering = "steering"; | ||
| constexpr llvm::StringLiteral kModePredicate = "predicate"; | ||
|
|
||
| // Operation Logic | ||
| constexpr llvm::StringLiteral kOpFused = "fused_op"; | ||
| constexpr llvm::StringLiteral kNeuraFusedOp = "neura.fused_op"; | ||
|
|
||
| } // namespace val | ||
|
|
||
| } // namespace attr | ||
| } // namespace neura | ||
| } // namespace mlir | ||
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
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
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
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.