Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
77a9f1a8
"...composable_kernel_rocm.git" did not exist on "cd8de112189710f9bd3a2a817e50ee5e583b4397"
Unverified
Commit
77a9f1a8
authored
Sep 01, 2024
by
Jakob Görgen
Browse files
experiments/simbricks/orchestration/instantiation/base : added missing socket creation method
parent
d910c30f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
experiments/simbricks/orchestration/instantiation/base.py
experiments/simbricks/orchestration/instantiation/base.py
+7
-5
No files found.
experiments/simbricks/orchestration/instantiation/base.py
View file @
77a9f1a8
...
...
@@ -123,9 +123,12 @@ class Instantiation:
)
self
.
_socket_tracker
[
channel
]
=
socket
def
_get_socket_by_interface
(
self
,
interface
:
system
.
base
.
Interface
)
->
str
|
None
:
# TODO
pass
def
_get_socket_by_interface
(
self
,
interface
:
system
.
base
.
Interface
)
->
Socket
|
None
:
channel
=
self
.
_get_chan_by_interface
(
interface
=
interface
)
socket
=
self
.
_get_socket_by_channel
(
channel
=
channel
)
return
socket
def
_interface_to_sock_path
(
self
,
interface
:
system
.
base
.
Interface
)
->
str
:
basepath
=
pathlib
.
Path
(
self
.
_env
.
_workdir
)
...
...
@@ -163,6 +166,7 @@ class Instantiation:
socket
=
self
.
_get_socket_by_interface
(
interface
=
interface
)
if
socket
is
not
None
:
new_socket
=
self
.
_create_opposing_socket
(
socket
=
socket
)
return
new_socket
# neither connecting nor listening side already created a socket, thus we
# create a completely new 'CONNECT' socket
...
...
@@ -170,10 +174,8 @@ class Instantiation:
# create the socket path
sock_path
=
self
.
_interface_to_sock_path
(
interface
=
interface
)
new_socket
=
Socket
(
path
=
sock_path
,
ty
=
sock_type
)
# update the socket tracker mapping for other side
self
.
_updated_tracker_mapping
(
interface
=
interface
,
socket
=
new_socket
)
return
new_socket
# TODO: add more methods constructing paths as required by methods in simulators or image handling classes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment