mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-04-03 03:00:17 -04:00
Follow https://github.com/nod-ai/SHARK/pull/708, remove parameter 'func_name' for SharkInference.
15 lines
437 B
Python
15 lines
437 B
Python
from shark.shark_inference import SharkInference
|
|
from shark.shark_downloader import download_model
|
|
|
|
mlir_model, func_name, inputs, golden_out = download_model(
|
|
"bloom", frontend="torch"
|
|
)
|
|
|
|
shark_module = SharkInference(
|
|
mlir_model, device="cpu", mlir_dialect="tm_tensor"
|
|
)
|
|
shark_module.compile()
|
|
result = shark_module.forward(inputs)
|
|
print("The obtained result via shark is: ", result)
|
|
print("The golden result is:", golden_out)
|