Open Peter9606 opened 4 months ago
Can you share more context about what went wrong (specific error message + surrounding context)? Also, can you be more specific about what you tried to do (which Resnet-18 example, at what point did it fail, etc.)?
We (Peter and I) use the case: SHARK-Turbine/core/examples/resnet-18/resnet-18.py, and change it to cuda backend:
diff --git a/core/examples/resnet-18/resnet-18.py b/core/examples/resnet-18/resnet-18.py index 2034001..635ac9a 100644 --- a/core/examples/resnet-18/resnet-18.py +++ b/core/examples/resnet-18/resnet-18.py @@ -31,14 +31,17 @@ class RN18(CompiledModule):
exported = export(RN18) +#exported.print_readable() ... -compiled_binary = exported.compile(save_to=None) +#compiled_binary = exported.compile(save_to=None) +compiled_binary = exported.compile(save_to=None, target_backends="cuda") ... def shark_infer(x):
Then, we got a runtime error in exporter.py:
raise RuntimeError("Compilation failed: See diagnostics")
RuntimeError: Compilation failed: See diagnostics
So, we dump the .mlir (by enabling model.print_readable()) and compile it with iree-compile
finding some errors. One of them are
'scf.for' op upper bound should be a constant.
Hi,
Can example Resnet-18 run on CUDA ? I'm asking this for I got following error while trying to run Resnet-18 example with modifying target_backends to "cuda".