We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be6acbe commit 7bbb07aCopy full SHA for 7bbb07a
py/torch_tensorrt/_Input.py
@@ -372,18 +372,11 @@ def example_tensor(
372
)
373
374
if isinstance(self.shape, dict):
375
- if (
376
- self.dtype == dtype.u8
377
- or self.dtype == dtype.i8
378
- or self.dtype == dtype.i32
379
- or self.dtype == dtype.i64
380
- ):
+ if self.dtype in [dtype.u8, dtype.i8, dtype.i32, dtype.i64]:
381
type = self.dtype.to(torch.dtype, use_default=True)
382
- min_value = torch.iinfo(type).min
383
- max_value = torch.iinfo(type).max
384
return torch.randint(
385
- min_value,
386
- max_value,
+ torch.iinfo(type).min,
+ torch.iinfo(type).max,
387
self.shape[optimization_profile_field],
388
dtype=type,
389
0 commit comments