Skip to content

Generate reference result for PyTorch #88

Open

Description

@adriantre

The docs for refers to resnet18_quant.py as this generates reference results. It seems not to be present in the repo. More specifically, I am looking for how to dump the reference result of the quantized model. This in order to:

  1. Crosscheck the reference result and the DPU inference result.

https://docs.xilinx.com/r/en-US/ug1414-vitis-ai/PyTorch-Workflow

  1. Generate the reference result by running the following command to generate reference data.
    python resnet18_quant.py --quant_mode test

Activity

  1. adriantre commented on Jan 5, 2023

    @adriantre
    Author

    Found the file in the main repo.
    https://github.com/Xilinx/Vitis-AI/blob/master/src/Vitis-AI-Quantizer/vai_q_pytorch/example/resnet18_quant.py

    The script does not seem to store reference results in the directory specified in the docs.

    Can I request an update to the docs for the PyTorch version of this step?

    4. Generate the DPU inference result by running the following command to generate the DPU inference result and compare the DPU inference result with the reference data automatically.
    
    env XLNX_ENABLE_DUMP=1 XLNX_ENABLE_DEBUG_MODE=1 XLNX_GOLDEN_DIR=./dump_gpu/dump_results_0 \
       xdputil run ./compile_model/resnet_v1_50_tf.xmodel            \
       ./dump_gpu/dump_results_0/input_aquant.bin                    \
       2>result.log 1>&2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions