Last active
May 10, 2023 12:50
-
-
Save tucan9389/0a307f4ad281d319e25c7507f94d59e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* original code of mlir.js in netron repo | |
* https://github.com/lutzroeder/netron/blob/main/source/mlir.js | |
*/ | |
if (process.argv.length >= 3) { | |
const fs = require('fs'); | |
function runParser(textContent) { | |
const decoder = text.Decoder.open(textContent); | |
const parser = new mlir.Parser(decoder); | |
const obj = parser.read(); | |
const model = new mlir.Model(obj); | |
} | |
const mlirFilePath = process.argv[2]; | |
const fileText = fs.readFileSync(mlirFilePath, 'utf8'); | |
runParser(fileText); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment