Skip to content

Commit

Permalink
Update mlir.js (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Apr 23, 2023
1 parent 4410e45 commit 6f83d4f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/mlir.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ mlir.ModelFactory = class {
open(context) {
const stream = context.stream;
const decoder = text.Decoder.open(stream);
new mlir.Parser(decoder);
throw new mlir.Error('MLIR support is not implemented.');
const parser = new mlir.Parser(decoder);
const obj = parser.read();
const model = new mlir.Model(obj);
return Promise.resolve(model);
}
};

mlir.Model = class {

constructor() {
constructor(/* obj */) {
this._format = 'MLIR';
this._graphs = [];
}
Expand All @@ -57,6 +59,10 @@ mlir.Parser = class {
constructor(decoder) {
this._tokenizer = new mlir.Tokenizer(decoder);
}

read() {
throw new mlir.Error('MLIR support is not implemented.');
}
};

mlir.Error = class extends Error {
Expand Down

0 comments on commit 6f83d4f

Please sign in to comment.