Skip to content

Import ERROR in FP8 quantization #595

Description

@SrinadhVura

I am trying to quantize a model to FP8 following the script at https://github.com/OpenPPL/ppq/blob/master/ppq/samples/FP8/fp8_sample.py . But receiving the following error

ImportError: /local/mnt/workspace/tvura/PPQ/penv/lib/python3.10/site-packages/ppq-0.6.6-py3.10.egg/ppq/csrc/build/PPQ_Cuda_Impls.so: cannot open shared object file: No such file or directory

In this snippet,

pipeline = PFL.Pipeline([
    ParameterQuantizePass(),
    RuntimeCalibrationPass(),
    LearnedStepSizePass(
        steps=1000, is_scale_trainable=False, 
        lr=1e-4, block_size=4, collecting_device='cuda'),
    ParameterBakingPass()
])

with ENABLE_CUDA_KERNEL():
    # 调用管线完成量化
    pipeline.optimize(
        graph=graph, dataloader=dataset, verbose=True, 
        calib_steps=32, collate_fn=collate_fn, executor=executor)

    # 执行量化误差分析
    graphwise_error_analyse(
        graph=graph, running_device='cuda', 
        dataloader=dataset, collate_fn=collate_fn)

At pipeline.optimize()

I'm using the latest version of ppq 0.6.6 and am able to perform INT8 quantization and export the model

Activity

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