Skip to content

Instantly share code, notes, and snippets.

@tucan9389
Created May 1, 2023 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tucan9389/86a078580476fd8e3f5b8200cc1fe589 to your computer and use it in GitHub Desktop.
Save tucan9389/86a078580476fd8e3f5b8200cc1fe589 to your computer and use it in GitHub Desktop.
{
"functions": [
{
"name": "@main",
"inputs": [
"%image",
"%weights",
"%bias"
],
"inputTypes": [
"tensor<28x28xf32>",
"tensor<784x10xf32>",
"tensor<1x10xf32>"
],
"outputTypes": {
"0": {
"type": "tensor<1x10xf32>"
}
},
"operations": [
{
"name": "stablehlo.reshape",
"attributes": {},
"inputs": [
"%image"
],
"inputTypes": [
"tensor<28x28xf32>"
],
"outputs": [
"%0"
],
"outputTypes": [
"tensor<1x784xf32>"
],
"body": null
},
{
"name": "stablehlo.dot",
"attributes": {},
"inputs": [
"%0",
"%weights"
],
"inputTypes": [
"tensor<1x784xf32>",
"tensor<784x10xf32>"
],
"outputs": [
"%1"
],
"outputTypes": [
"tensor<1x10xf32>"
],
"body": null
},
{
"name": "stablehlo.add",
"attributes": {},
"inputs": [
"%1",
"%bias"
],
"inputTypes": [
"tensor<1x10xf32>",
"tensor<1x10xf32>"
],
"outputs": [
"%2"
],
"outputTypes": [
"tensor<1x10xf32>"
],
"body": null
},
{
"name": "stablehlo.constant",
"attributes": {
"value": "dense<0.0> : tensor<1x10xf32>"
},
"inputs": [],
"inputTypes": [],
"outputs": [
"%3"
],
"outputTypes": [
"tensor<1x10xf32>"
],
"body": null
},
{
"name": "stablehlo.maximum",
"attributes": {},
"inputs": [
"%2",
"%3"
],
"inputTypes": [
"tensor<1x10xf32>",
"tensor<1x10xf32>"
],
"outputs": [
"%4"
],
"outputTypes": [
"tensor<1x10xf32>"
],
"body": null
},
{
"name": "stablehlo.return",
"attributes": {},
"inputs": [
"%4"
],
"inputTypes": [
"tensor<1x10xf32>"
],
"outputs": [],
"outputTypes": [],
"body": null
}
]
}
],
"operations": [],
"attributes": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment