Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Commits
59ca4816
Commit
59ca4816
authored
1 year ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Minor fixes for resource allocation
parent
9deb17e1
No related branches found
Branches containing commit
No related tags found
1 merge request
!291
Minor fixes for resource allocation
Pipeline
#94134
passed
1 year ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/resources.py
+4
-5
4 additions, 5 deletions
b_asic/resources.py
b_asic/schedule.py
+8
-7
8 additions, 7 deletions
b_asic/schedule.py
with
12 additions
and
12 deletions
b_asic/resources.py
+
4
−
5
View file @
59ca4816
...
...
@@ -9,7 +9,7 @@ from matplotlib.axes import Axes
from
matplotlib.ticker
import
MaxNLocator
from
b_asic._preferences
import
LATENCY_COLOR
from
b_asic.process
import
MemoryVariable
,
PlainMemoryVariable
,
Process
from
b_asic.process
import
MemoryVariable
,
OperatorProcess
,
PlainMemoryVariable
,
Process
from
b_asic.types
import
TypeName
# Default latency coloring RGB tuple
...
...
@@ -1124,7 +1124,7 @@ class ProcessCollection:
def
get_by_type_name
(
self
,
type_name
:
TypeName
)
->
"
ProcessCollection
"
:
"""
Return a ProcessCollection with only a given type of operation
s
.
Return a ProcessCollection with only a given type of operation.
Parameters
----------
...
...
@@ -1133,11 +1133,9 @@ class ProcessCollection:
Returns
-------
None.
ProcessCollection
"""
from
b_asic.process
import
OperatorProcess
return
ProcessCollection
(
{
process
...
...
@@ -1146,4 +1144,5 @@ class ProcessCollection:
and
process
.
_operation
.
type_name
()
==
type_name
},
self
.
_schedule_time
,
self
.
_cyclic
,
)
This diff is collapsed.
Click to expand it.
b_asic/schedule.py
+
8
−
7
View file @
59ca4816
...
...
@@ -717,13 +717,14 @@ class Schedule:
ProcessCollection
"""
return
ProcessCollection
(
set
(
self
.
_get_operations_list
()),
self
.
schedule_time
)
def
_get_operations_list
(
self
)
->
List
[
OperatorProcess
]:
return
[
OperatorProcess
(
start_time
,
self
.
_sfg
.
find_by_id
(
graph_id
))
for
graph_id
,
start_time
in
self
.
_start_times
.
items
()
]
return
ProcessCollection
(
{
OperatorProcess
(
start_time
,
self
.
_sfg
.
find_by_id
(
graph_id
))
for
graph_id
,
start_time
in
self
.
_start_times
.
items
()
},
self
.
schedule_time
,
self
.
cyclic
,
)
def
_get_y_position
(
self
,
graph_id
,
operation_height
=
1.0
,
operation_gap
=
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment