exaloop / codon

A high-performance, zero-overhead, extensible Python compiler using LLVM
https://docs.exaloop.io/codon
Other
15.01k stars 517 forks source link

"expected type expression" for third-party base class in inheritance #463

Open sdflkjssl opened 1 year ago

sdflkjssl commented 1 year ago

When I tried to run this:

from python import torch.nn as nn

class Network(nn.Module):
    ...

Gives me the error: "expected type expression" on nn.Module (or other third-party classes such as numpy.ndarray) during building, while nn.Module() can be called directly to initialize a module instance. Also, it doesn't give me an error when the base class is defined by myself.

tersiteab commented 12 months ago

Hi, did this error get resolved?