Skip to content

Fix some conversion issues on the corner cases for transformer based …#4080

Open
wenbingl wants to merge 1 commit intopytorch:mainfrom
wenbingl:zasr
Open

Fix some conversion issues on the corner cases for transformer based …#4080
wenbingl wants to merge 1 commit intopytorch:mainfrom
wenbingl:zasr

Conversation

@wenbingl
Copy link
Contributor

Fix some conversion issues on the corner cases for transformer based ASR model.
Verified the issue gone after apply the changes in PR.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

@meta-cla meta-cla bot added the cla signed label Feb 12, 2026
@github-actions github-actions bot added component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Feb 12, 2026
@github-actions github-actions bot requested a review from narendasan February 12, 2026 22:41
try:
max_val = int(var_range.upper)
except (TypeError, AttributeError, ValueError, OverflowError):
max_val = 2**31 - 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you know what the TRT max dimension size is?

I think theres a cleaner way to do this, but theres some additional changes needed.

In general I think in the inf case we should have some sane default

cc: @zewenli98

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to proposed some more systematic fixing, I can only do a simple ad-hoc fix to demo the issues.
RE: Do you know what the TRT max dimension size is?
TensorRT dim data type is int64_t, but when I tried to int64 maximum value, it seems incompatible with pyTorch and raise some exceptions.

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: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants