Skip to content
This repository was archived by the owner on Apr 18, 2023. It is now read-only.
This repository was archived by the owner on Apr 18, 2023. It is now read-only.

TENSOR_QUANT8_ASYMM tensor is not supported #74

@Christywl

Description

@Christywl

Test Env:
Chromium Version : nightly build 65.0.3324.0 (revision f9e1a31)
OS : Mac OS X 10.13.4

Expected Result:
Could set a Uint8Array data for a TENSOR_QUANT8_ASYMM tensor

Actual Result:
fail to set a Uint8Array data for a TENSOR_QUANT8_ASYMM tensor:

AssertionError: expected [Function] to not throw an error but 'Error: Invalid value 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0' was thrown
    at nn.createModel.then (unit-test/test-Model.js:801:16)

How to reproduce:
1.Download and install Chromium
2.Launch Chromium
3. Run test case on Chromium: https://brucedai.github.io/nt/test/index-local.html?backend=webgl2
4. Check the result for this test in setOperandValue API
codes:
https://github.com/intel/webml-polyfill/blob/master/test/unit-test/test-Model.js#L795:

    it('setting an Uint8Array data for a TENSOR_QUANT8_ASYMM tensor is ok', function() {
      return nn.createModel(options).then((model)=>{
        let op = {type: nn.TENSOR_QUANT8_ASYMM, dimensions: TENSOR_DIMENSIONS, scale: 0.8, zeroPoint: 1};
        model.addOperand(op);
        let data = new Uint8Array(product(op.dimensions));
        data.fill(0);
        assert.doesNotThrow(() => {
          model.setOperandValue(0, data);
        });
      });
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions