Skip to content

Commit

Permalink
Fix messaging imports
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>
  • Loading branch information
Marcus G K Williams authored and Marcus G K Williams committed Sep 27, 2023
1 parent 7828613 commit 22106fd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/lava/magma/compiler/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from dataclasses import dataclass

from lava.magma.compiler.builders.interfaces import AbstractChannelBuilder
from lava.magma.compiler.channels.watchdog import WatchdogManagerBuilder
from lava.magma.runtime.message_infrastructure.watchdog import \
WatchdogManagerBuilder
from lava.magma.core.sync.domain import SyncDomain

if ty.TYPE_CHECKING:
Expand Down
7 changes: 4 additions & 3 deletions src/lava/magma/runtime/message_infrastructure/nx.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

import typing as ty

from lava.magma.compiler.channels.interfaces import ChannelType
from lava.magma.runtime.message_infrastructure.interfaces import \
ChannelType
from lava.magma.core.sync.domain import SyncDomain
from lava.magma.runtime.message_infrastructure \
.message_infrastructure_interface import \
MessageInfrastructureInterface
from lava.magma.runtime.message_infrastructure import Channel
try:
from lava.magma.compiler.channels.nccchannel import NcCChannel
from lava.magma.compiler.channels.cncchannel import CNcChannel
from lava.magma.runtime.message_infrastructure.nccchannel import NcCChannel
from lava.magma.runtime.message_infrastructure.cncchannel import CNcChannel
except ImportError:
class CNcChannel:
pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)

try:
from lava.magma.compiler.channels.cpychannel import \
from lava.magma.runtime.message_infrastructure.cpychannel import \
CPyChannel, PyCChannel
except ImportError:
class CPyChannel:
Expand Down
3 changes: 2 additions & 1 deletion src/lava/magma/runtime/message_infrastructure/pypychannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from time import time
from scipy.sparse import csr_matrix
from lava.utils.sparse import find
from lava.magma.compiler.channels.watchdog import Watchdog, NoOPWatchdog
from lava.magma.runtime.message_infrastructure.watchdog import \
Watchdog, NoOPWatchdog


import numpy as np
Expand Down
7 changes: 4 additions & 3 deletions src/lava/magma/runtime/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@
from lava.magma.compiler.builders.py_builder import PyProcessBuilder
from lava.magma.compiler.builders.runtimeservice_builder import \
RuntimeServiceBuilder
from lava.magma.compiler.channels.interfaces import AbstractCspPort, Channel, \
ChannelType
from lava.magma.runtime.message_infrastructure.interfaces import \
Channel, ChannelType
from lava.magma.compiler.executable import Executable
from lava.magma.compiler.node import NodeConfig
from lava.magma.core.process.ports.ports import create_port_id
from lava.magma.core.run_conditions import (AbstractRunCondition,
RunContinuous, RunSteps)
from lava.magma.compiler.channels.watchdog import WatchdogManagerInterface
from lava.magma.runtime.message_infrastructure.watchdog import \
WatchdogManagerInterface

"""Defines a Runtime which takes a lava executable and a pluggable message
passing infrastructure (for instance multiprocessing+shared memory or ray in
Expand Down

0 comments on commit 22106fd

Please sign in to comment.