NVIDIA / NVIDIA/TensorRT

build pytorch_quantization(2.2.1) error

Open
#4,193 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Description

when I try to build pytorch_quantization from source following readme.md, building error happens in tensor_quant_gpu.cu. and I think maybe some version problem

Environment

TensorRT Version:

NVIDIA GPU:

NVIDIA Driver Version:

CUDA Version:

CUDNN Version:
release 10.5

Operating System:
linux

Python Version (if applicable):
3.8.19

Tensorflow Version (if applicable):

PyTorch Version (if applicable):
1.12.1+cu113

In file included from /home/wxb/.conda/envs/quant_env/lib/python3.8/site-packages/torch/include/ATen/ATen.h:13,
from /home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu:18:
/home/wxb/.conda/envs/quant_env/lib/python3.8/site-packages/torch/include/ATen/Dispatch.h:262: note: this is the location of the previous definition
262 | #define AT_DISPATCH_FLOATING_TYPES(TYPE, NAME, ...)
|
/home/wxb/.conda/envs/quant_env/lib/python3.8/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(78): error: identifier "scalar_t" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(78): error: no instance of function template "fake_tensor_quant_kernel" matches the argument list
argument types are: (, size_t, , float *, int, __nv_bool)

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(78): error: identifier "AT_DISPATCH_CASE" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(78): error: expected a ")"

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(78): error: identifier "AT_DISPATCH_SWITCH" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(90): error: identifier "scalar_t" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(90): error: no instance of function template "fake_tensor_quant_kernel" matches the argument list
argument types are: (, size_t, , float *, int, __nv_bool)

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(90): error: identifier "AT_DISPATCH_CASE" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(90): error: expected a ")"

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(90): error: identifier "AT_DISPATCH_SWITCH" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(130): error: identifier "scalar_t" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(130): error: no instance of function template "fake_tensor_quant_with_axis_cuda_kernel" matches the argument list
argument types are: (, size_t, , float *, int, int, int, __nv_bool)

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(130): error: identifier "AT_DISPATCH_CASE" is undefined

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(130): error: expected a ")"

/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu(130): error: identifier "AT_DISPATCH_SWITCH" is undefined

15 errors detected in the compilation of "/home/wxb/workspace/TensorRT/tools/pytorch-quantization/src/tensor_quant_gpu.cu".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with README.md and tools/pytorch-quantization/src/tensor_quant_gpu.cu, then reproduce the source build using the reported PyTorch 1.12.1+cu113, Python 3.8.19, Linux, and CUDNN 10.5 environment. Check whether the documented versions match the build requirements and trace the reported scalar_t and AT_DISPATCH errors. Done means the package builds successfully without these compilation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, pytorch
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.