Skip to content

Jart synapse #709

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
wants to merge 86 commits into
base: master
Choose a base branch
from
Open

Jart synapse #709

wants to merge 86 commits into from

Conversation

ZhenmingYu
Copy link

Related issues

Support a new device type based on JART V1b memristor model and test scripts for that.
Details can be found at https://ieeexplore.ieee.org/document/10052010

Fixing the issues in #583 and #679 about building errors

Description

Deleted CUDA related codes, fixed JART CPU version.
Still not able to run properly, issues relates to device.py and the linkage between python and c++ code.

Details

My original implementation was with the BUILD_PULSED_DEVICE_CONSTRUCTORS (commented out on line 540).
@maljoras changed it to the current implementation because he thinks some parts are not necessary for my device as I remembered.

I don't really have a good understanding of this section about managing the parameters and how they go in and out of the memory, so I'm not comfortable about changing stuff here.

However, by comparing with the BUILD_PULSED_DEVICE_CONSTRUCTORS, it seems that a "public:" was missing at line 266?
And adding that seems to have solved the compilation issue.

I don't really know the code here is correct or whether there are any problems.
But anyhow the examples are still not running yet, which means some part between the python-c++ linkage is still not correct.

My current error output:
(.venv) zyu@pgi15-gpu2:~/aihwkit$ python examples/03_mnist_training.py
Traceback (most recent call last):
File "/Users/zyu/aihwkit/examples/03_mnist_training.py", line 27, in
from aihwkit.nn import AnalogLinear, AnalogSequential
File "/Users/zyu/aihwkit/src/aihwkit/nn/init.py", line 11, in
from aihwkit.nn.modules.container import AnalogSequential, AnalogWrapper
File "/Users/zyu/aihwkit/src/aihwkit/nn/modules/container.py", line 17, in
from aihwkit.nn.modules.base import AnalogLayerBase
File "/Users/zyu/aihwkit/src/aihwkit/nn/modules/base.py", line 16, in
from aihwkit.simulator.tiles.module import TileModule
File "/Users/zyu/aihwkit/src/aihwkit/simulator/tiles/init.py", line 11, in
from aihwkit.simulator.tiles.analog import AnalogTile
File "/Users/zyu/aihwkit/src/aihwkit/simulator/tiles/analog.py", line 15, in
from aihwkit.simulator.tiles.rpucuda import RPUCudaSimulatorTileWrapper
File "/Users/zyu/aihwkit/src/aihwkit/simulator/tiles/rpucuda.py", line 18, in
from aihwkit.simulator.parameters.base import RPUConfigGeneric
File "/Users/zyu/aihwkit/src/aihwkit/simulator/parameters/init.py", line 25, in
from .training import UpdateParameters
File "/Users/zyu/aihwkit/src/aihwkit/simulator/parameters/training.py", line 14, in
from .helpers import _PrintableMixin
File "/Users/zyu/aihwkit/src/aihwkit/simulator/parameters/helpers.py", line 14, in
from aihwkit.simulator import rpu_base
ImportError: /Users/zyu/aihwkit/src/aihwkit/simulator/rpu_base.cpython-312-x86_64-linux-gnu.so: undefined symbol: _ZN3RPU29JARTv1bRPUDeviceMetaParameterIfE10initializeEv

@ZhenmingYu ZhenmingYu mentioned this pull request Jan 30, 2025
@PabloCarmona PabloCarmona requested a review from coreylammie March 5, 2025 16:49
@coreylammie
Copy link
Collaborator

Hi @ZhenmingYu,

It looks like you have a linking error and the following de-mangled symbol is not being found: RPU::JARTv1bRPUDeviceMetaParameter<float>::initialize(). I would suggest adding a new line in CMakeLists here: https://github.com/IBM/aihwkit/blob/master/CMakeLists.txt#L165, message(${EXTENSION_BINDINGS_SRCS}) to check whether it is being correctly associated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants