Skip to content
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

Adding neural network layers into the vertex centric program #13

Open
JoelMathewC opened this issue Feb 26, 2023 · 0 comments
Open

Adding neural network layers into the vertex centric program #13

JoelMathewC opened this issue Feb 26, 2023 · 0 comments
Labels
frontend Relating to frontend module

Comments

@JoelMathewC
Copy link
Contributor

This issue will explore the need for neural network layers to be used within the vertex-centric program. If a need is seen, this issue can further discuss how this feature can be added and its feasibility,

Currently seastar does not support neural network layers in the vertex centric program. Given below is an example of a program and the error flagged by the compiler when attempting to compile the program.

@self.cm.zoomIn(nspace=[self, torch])
        def nb_compute(v):
            h = sum([torch.mm(nb.h, self.weight)*nb.norm for nb in v.innbs])
            h = h * v.norm
            return h
Exception: <built-in method mm of type object at 0x7f8e33365420> e self must be a matrix args: (Vhinb(ValType.S,[1433],grad:None), Vweight(ValType.P,[1433, 16],grad:None)) kargs {}
Traceback (most recent call last):
  File "./train.py", line 189, in <module>
    main(args)
  File "./train.py", line 135, in main
    logits = model(features)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/gdrive/MyDrive/Seastar/exp/gcn/test/gcn_spmv.py", line 87, in forward
    h = layer(h)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/gdrive/MyDrive/Seastar/exp/gcn/test/gcn_spmv.py", line 56, in forward
    h = nb_compute(g=self.g, n_feats={'norm': self.norm, 'h' : h})
  File "/usr/local/lib/python3.8/dist-packages/seastar-0.1-py3.8.egg/seastar/zoom_v2.py", line 43, in __call__
    executor = self._setup_executor(**kwargs)
  File "/usr/local/lib/python3.8/dist-packages/seastar-0.1-py3.8.egg/seastar/zoom_v2.py", line 58, in _setup_executor
    ret = self._trace(node_feats, edge_feats, self._input_cache, fprog)
  File "/usr/local/lib/python3.8/dist-packages/seastar-0.1-py3.8.egg/seastar/zoom_v2.py", line 100, in _trace
    ret = self._f(central_node)
  File "/content/gdrive/MyDrive/Seastar/exp/gcn/test/gcn_spmv.py", line 53, in nb_compute
    h = sum([torch.mm(nb.h, self.weight)*nb.norm for nb in v.innbs])
  File "/content/gdrive/MyDrive/Seastar/exp/gcn/test/gcn_spmv.py", line 53, in <listcomp>
    h = sum([torch.mm(nb.h, self.weight)*nb.norm for nb in v.innbs])
  File "/usr/local/lib/python3.8/dist-packages/seastar-0.1-py3.8.egg/seastar/op.py", line 30, in __call__
    raise e
  File "/usr/local/lib/python3.8/dist-packages/seastar-0.1-py3.8.egg/seastar/op.py", line 27, in __call__
    ret = self._op(*tuple(arg.v for arg in args), **kargs)
RuntimeError: self must be a matrix
@JoelMathewC JoelMathewC added the frontend Relating to frontend module label Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Relating to frontend module
Projects
None yet
Development

No branches or pull requests

1 participant