Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyTorch Baseline perhaps too weak? #31

Open
xinli-git opened this issue Jan 11, 2023 · 0 comments
Open

PyTorch Baseline perhaps too weak? #31

xinli-git opened this issue Jan 11, 2023 · 0 comments

Comments

@xinli-git
Copy link

I am wondering if the PyTorch baseline is actually optimized enough? Specifically, could you

  • Remove autocast since the model is already in FP16? AutoCast would actually convert some other non-GEMM fp16 kernels in FP32 (or TF32 in the case of Ampere GPUs)
  • Run some warm up iteration before measuring the inference latency (averaged across a few)? Like how you did it with TensorRT
  • Use flags such as torch.backends.cudnn.benchmark = True before running GPU kernels.

On my local machine, just these optimizations (for lack of a better word as they are not really optimizations) would make PyTorch baseline at least 2X faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant