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

fix: Change the translational layer from numpy to torch during conversion to handle additional data types #3445

Merged
merged 12 commits into from
Apr 1, 2025

Conversation

peri044
Copy link
Collaborator

@peri044 peri044 commented Mar 18, 2025

Description

We use numpy internally to convert from torch tensor into TensorRT tensor. This PR changes that to Pytorch for comprehensive data type support (eg: BF16)

Fixes #3439

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@peri044 peri044 requested a review from narendasan March 18, 2025 17:05
@github-actions github-actions bot added component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Mar 18, 2025
@github-actions github-actions bot requested a review from gs-olive March 18, 2025 17:05
@peri044 peri044 requested review from zewenli98 and removed request for gs-olive March 18, 2025 17:05
@peri044 peri044 added the WIP Work is in progress, pull request should not be merged yet label Mar 18, 2025
@github-actions github-actions bot requested a review from gs-olive March 18, 2025 17:10
@peri044 peri044 removed the WIP Work is in progress, pull request should not be merged yet label Mar 18, 2025
Copy link
Collaborator

@zewenli98 zewenli98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some minor comments

@peri044 peri044 merged commit dbd3944 into main Apr 1, 2025
68 checks passed
peri044 added a commit that referenced this pull request Apr 1, 2025
@peri044 peri044 mentioned this pull request Apr 1, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] API Usage Error when using bfloat16 and use_explicit_typing
3 participants