-
Notifications
You must be signed in to change notification settings - Fork 9
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
OPEN: FP integration (v2) #12
Merged
Merged
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5ae9fe6
Added floating point support
2a9fc41
Added floatadder fp32 for generic platform
599b732
Added float adder test
51b3223
Small corrections for installation guide
df702a6
Formatted style
ae6199d
Fix a few issues raised in PR#3 review.
FrancescoConti 7a0f666
Autoformatting
FrancescoConti a4c6604
Change 'typeFraction' to 'typeMantissa' in FloatImmediate
FrancescoConti 86199c8
Align type names of floats to other types
FrancescoConti 65c6477
Align type names also in testTypes.py
FrancescoConti a3ee2a1
Workaround for CI (disable bfloat16_t, float16_t in PULPOpen types.h)
FrancescoConti d870e25
Fix or comment other minor comments in PR #12
FrancescoConti 673458a
Fix blunder in prev. commit
FrancescoConti c01d09d
Extremely stupid linting fix
FrancescoConti b6cf6fa
Add Alberto+myself as contributors
FrancescoConti 35d2fa5
Add FloatAddChecker to CI (and make it work again, if possible)
FrancescoConti fd15611
fix test name...
FrancescoConti ecc0bd4
Update Changelog and file authorship + Revert unnecessary banshee pat…
Victor-Jung 8726be2
Merge branch 'fconti/float' of github.com:pulp-platform/Deeploy into …
Victor-Jung ce1d80d
This bloody linting
Victor-Jung 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 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 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 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,50 @@ | ||
# ---------------------------------------------------------------------- | ||
# | ||
# File: FloatAddTemplate.py | ||
# | ||
# Last edited: 15.12.2021 | ||
# | ||
# Copyright (C) 2021, ETH Zurich and University of Bologna. | ||
# | ||
# Author: Moritz Scherer, ETH Zurich | ||
# | ||
# ---------------------------------------------------------------------- | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the License); you may | ||
# not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an AS IS BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from typing import Dict, List, Tuple | ||
|
||
from Deeploy.DeeployTypes import NetworkContext, NodeTemplate, OperatorRepresentation | ||
|
||
|
||
class _FloatAddTemplate(NodeTemplate): | ||
|
||
def alignToContext(self, ctxt: NetworkContext, | ||
operatorRepresentation: OperatorRepresentation) -> Tuple[NetworkContext, Dict, List[str]]: | ||
|
||
data_in_1 = ctxt.lookup(operatorRepresentation['data_in_1']) | ||
data_in_2 = ctxt.lookup(operatorRepresentation['data_in_2']) | ||
data_out = ctxt.lookup(operatorRepresentation['data_out']) | ||
|
||
return ctxt, operatorRepresentation, [] | ||
|
||
|
||
referenceTemplate = _FloatAddTemplate(""" | ||
// Add (Name: ${nodeName}, Op: ${nodeOp}) | ||
BEGIN_SINGLE_CORE | ||
for (uint32_t i=0;i<${size};i++){ | ||
${data_out}[i] = ${data_in_1}[i] + ${data_in_2}[i]; | ||
} | ||
END_SINGLE_CORE | ||
""") |
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
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: I appreciate the credit, but you might want to claim it for yourselves :)