qairt-visualizer 0.5.0__py3-none-win_amd64.whl → 0.5.1__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -748,7 +748,10 @@ host.BrowserHost.FileStream = class {
748
748
  length = length === undefined ? this._length - this._position : length;
749
749
  if (length < 0x10000000) {
750
750
  const position = this._fill(length);
751
- return this._buffer.subarray(position, position + length);
751
+ // TODO: Remove comment after next Netron upgrade: https://github.com/lutzroeder/netron/issues/1487
752
+ // QAIRT Netron: use slice to create new copy of data
753
+ return this._buffer.slice(position, position + length);
754
+ // QAIRT Netron END
752
755
  }
753
756
  const position = this._start + this._position;
754
757
  this.skip(length);
@@ -148,6 +148,7 @@ dlc.v4.Node = class Node {
148
148
  }
149
149
  };
150
150
 
151
+ // QAIRT Netron: Fix property names and reader methods according to FlatBuffers schema: https://review.qualcomm.com/plugins/gitiles/zsnpe/ml/+/refs/heads/mainline/DnnSerializationV2/src/DlcV4/NetworkCommon.fbs
151
152
  dlc.v4.Attribute = class Attribute {
152
153
 
153
154
  static decode(reader, position) {
@@ -155,25 +156,24 @@ dlc.v4.Attribute = class Attribute {
155
156
  $.name = reader.string_(position, 4, null);
156
157
  $.kind = reader.int32_(position, 6, 0);
157
158
  $.flag = reader.uint8_(position, 8, 0);
158
- $.value = reader.table(position, 10, dlc.v4.Value);
159
+ $.value = reader.table(position, 10, dlc.v4.ScalarData);
159
160
  $.tensor = reader.table(position, 12, dlc.v4.Tensor);
160
161
  return $;
161
162
  }
162
163
  };
163
164
 
164
- dlc.v4.Value = class Value {
165
+ dlc.v4.ScalarData = class ScalarData {
165
166
 
166
167
  static decode(reader, position) {
167
- const $ = new dlc.v4.Value();
168
- $.kind = reader.int32_(position, 4, 0);
169
- $.int32_value = reader.int32_(position, 6, 0);
170
- $.float32_value = reader.float32_(position, 8, 0);
171
- $.string_value = reader.string_(position, 10, null);
168
+ const $ = new dlc.v4.ScalarData();
169
+ $.kind = reader.uint32_(position, 4, 0);
170
+ $.int = reader.int64_(position, 6, 0);
171
+ $.float = reader.float64_(position, 8, 0);
172
+ $.string = reader.string_(position, 10, null);
172
173
  return $;
173
174
  }
174
175
  };
175
176
 
176
- // QAIRT Netron: Fix quantization property names according to FlatBuffers schema: https://review.qualcomm.com/plugins/gitiles/zsnpe/ml/+/refs/heads/mainline/DnnSerializationV2/src/DlcV4/NetworkCommon.fbs
177
177
  dlc.v4.Tensor = class Tensor {
178
178
 
179
179
  static decode(reader, position) {
@@ -484,37 +484,39 @@ dlc.Container = class {
484
484
  switch (attribute.kind) {
485
485
  case 0: {
486
486
  const value = attribute.value;
487
+ // QAIRT Netron: Modify attribute value property names according to the ScalarData table
487
488
  switch (value.kind) {
488
489
  case 0x7fffffff:
489
- attribute.data = value.string_value;
490
+ attribute.data = value.string;
490
491
  attribute.type = 'string';
491
492
  break;
492
493
  case 0x0032:
493
- attribute.data = value.int32_value;
494
+ attribute.data = value.int;
494
495
  break;
495
496
  case 0x0108:
496
- attribute.data = value.int32_value;
497
+ attribute.data = value.int;
497
498
  attribute.type = 'int8';
498
499
  break;
499
500
  case 0x0132:
500
- attribute.data = value.int32_value;
501
+ attribute.data = value.int;
501
502
  attribute.type = 'int32';
502
503
  break;
503
504
  case 0x0232:
504
- attribute.data = value.float32_value;
505
+ attribute.data = value.float;
505
506
  attribute.type = 'float32';
506
507
  break;
507
508
  case 0x0508:
508
- attribute.data = value.int32_value !== 0;
509
+ attribute.data = value.int !== 0;
509
510
  attribute.type = 'boolean';
510
511
  break;
511
512
  case 0x0608:
512
- attribute.data = value.string_value;
513
+ attribute.data = value.string;
513
514
  attribute.type = 'string';
514
515
  break;
515
516
  default:
516
517
  throw new dlc.Error(`Unknown attribute value kind '${value.kind}'.`);
517
518
  }
519
+ // QAIRT Netron END
518
520
  break;
519
521
  }
520
522
  case 1: {