mirror of https://github.com/llvm/torch-mlir
14 lines
501 B
MLIR
14 lines
501 B
MLIR
// RUN: npcomp-opt -torch-globalize-object-graph -split-input-file -verify-diagnostics %s
|
|
|
|
torch.class_type @parent {
|
|
torch.method "module_type_return", @module_type_return
|
|
}
|
|
|
|
func private @module_type_return(%arg0: !torch.nn.Module<"parent">) {
|
|
// expected-error @+1 {{unsupported use of a torch.nn.Module. Expected only method calls or attribute get/set}}
|
|
basicpy.build_list %arg0 : (!torch.nn.Module<"parent">) -> !basicpy.ListType
|
|
return
|
|
}
|
|
|
|
torch.nn_module {} : !torch.nn.Module<"parent">
|