tensorrt-cu12-bindings 10.6.0.post2__cp310-none-win_amd64.whl → 10.7.0.post1__cp310-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tensorrt-cu12-bindings might be problematic. Click here for more details.

@@ -74,7 +74,7 @@ del _libs_wheel_imported
74
74
 
75
75
  from .tensorrt import *
76
76
 
77
- __version__ = "10.6.0.post2"
77
+ __version__ = "10.7.0.post1"
78
78
 
79
79
 
80
80
  # Provides Python's `with` syntax
@@ -18,7 +18,7 @@
18
18
  import tensorrt as trt
19
19
 
20
20
  logger = trt.Logger()
21
- logger.log(trt.Logger.WARNING, "Functionality provided through tensorrt.plugin module is experimental in TensorRT 10.6.")
21
+ logger.log(trt.Logger.WARNING, f"Functionality provided through tensorrt.plugin module is experimental.")
22
22
 
23
23
  # export.public_api() will expose things here. To make sure that happens, we just need to
24
24
  # import all the submodules so that the decorator is actually executed (__discover_modules() below).
@@ -1,12 +1,19 @@
1
+ #
1
2
  # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
- # SPDX-License-Identifier: LicenseRef-NvidiaProprietary
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
3
16
  #
4
- # NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
5
- # property and proprietary rights in and to this material, related
6
- # documentation and any modifications thereto. Any use, reproduction,
7
- # disclosure or distribution of this material and related documentation
8
- # without an express license agreement from NVIDIA CORPORATION or
9
- # its affiliates is strictly prohibited.
10
17
 
11
18
  from types import ModuleType
12
19
  import importlib
@@ -1,13 +1,19 @@
1
+ #
1
2
  # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
- # SPDX-License-Identifier: LicenseRef-NvidiaProprietary
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
3
16
  #
4
- # NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
5
- # property and proprietary rights in and to this material, related
6
- # documentation and any modifications thereto. Any use, reproduction,
7
- # disclosure or distribution of this material and related documentation
8
- # without an express license agreement from NVIDIA CORPORATION or
9
- # its affiliates is strictly prohibited.
10
-
11
17
  import tensorrt as trt
12
18
  from typing import Tuple
13
19
 
@@ -130,7 +130,7 @@ class ShapeExpr:
130
130
  "Not accessible for non-constant shape expressions. Check is_constant to determine accessibility."
131
131
  )
132
132
  return self._expr.get_constant_value()
133
-
133
+
134
134
  # Evaluate the underlying trt.IDimensionExpr, if so done lazily
135
135
  @property
136
136
  def _expr(self):
@@ -142,7 +142,7 @@ class SizeTensorShapeExpr(ShapeExpr):
142
142
  Extends :class:`ShapeExpr`
143
143
 
144
144
  A shape expression that represent a size tensor
145
-
145
+
146
146
  """
147
147
  def __init__(self, size_tensor_desc: "SizeTensorDesc"):
148
148
  """
@@ -155,7 +155,7 @@ class SizeTensorShapeExpr(ShapeExpr):
155
155
 
156
156
  def _op(self, op: trt.DimensionOperation, other: Union[int, "ShapeExpr"]):
157
157
  raise ValueError("It is not permitted to perform binary operations on size tensor expressions") # TRT limitation
158
-
158
+
159
159
  @property
160
160
  def is_constant(self):
161
161
  if self._is_dummy:
@@ -163,7 +163,7 @@ class SizeTensorShapeExpr(ShapeExpr):
163
163
  "Not accessible for fake 'ShapeExpr's. Check is_fake to determine accessibility."
164
164
  )
165
165
  return False
166
-
166
+
167
167
  @property
168
168
  def _expr(self):
169
169
  if self._dim_expr is not None:
@@ -171,7 +171,7 @@ class SizeTensorShapeExpr(ShapeExpr):
171
171
 
172
172
  self._dim_expr = super()._exprBuilder.declare_size_tensor(self._size_tensor_desc.index, self._size_tensor_desc.opt._expr, self._size_tensor_desc.upper_bound._expr)
173
173
  return self._dim_expr
174
-
174
+
175
175
  def __repr__(self):
176
176
  return f"ShapeExpr[is_size_tensor = True, id={id(self)}]"
177
177
 
@@ -237,16 +237,21 @@ class Shape:
237
237
  Numerical representation of a tensor shape
238
238
  """
239
239
  def __init__(
240
- self, tensor_desc: Union[int, trt.DynamicPluginTensorDesc, trt.PluginTensorDesc]
240
+ self, tensor_desc: Union[Tuple[int], trt.DynamicPluginTensorDesc, trt.PluginTensorDesc]
241
241
  ):
242
- self._desc = tensor_desc
243
242
  self._is_dynamic = None # set lazily
244
243
  if isinstance(tensor_desc, trt.DynamicPluginTensorDesc):
245
244
  self._length = len(tensor_desc.desc.dims)
246
245
  self._shapes = tensor_desc.desc.dims
246
+ self._desc = tensor_desc
247
247
  elif isinstance(tensor_desc, trt.PluginTensorDesc):
248
248
  self._length = len(tensor_desc.dims)
249
249
  self._shapes = tensor_desc.dims
250
+ elif isinstance(tensor_desc, tuple):
251
+ self._shapes = trt.Dims(tensor_desc)
252
+ self._length = len(self._shapes)
253
+ else:
254
+ raise ValueError("Unsupported type used for constructing trt.plugin.Shape! tensor_desc must be a Tuple[int], trt.DynamicPluginTensorDesc, or trt.PluginTensorDesc")
250
255
 
251
256
  def numel(self) -> int:
252
257
  """
@@ -293,6 +298,10 @@ class Shape:
293
298
  """
294
299
  if not self.is_dynamic:
295
300
  raise ValueError("opt property is only accessible if is_dynamic is true")
301
+ if not hasattr(self, "_desc"):
302
+ raise AttributeError(
303
+ "Shape object has at least one dynamic dimension, but no information is available on 'opt' property."
304
+ )
296
305
  return tuple(self._desc.opt)
297
306
 
298
307
  @property
@@ -302,6 +311,10 @@ class Shape:
302
311
  """
303
312
  if not self.is_dynamic:
304
313
  raise ValueError("min property is only accessible if is_dynamic is true")
314
+ if not hasattr(self, "_desc"):
315
+ raise AttributeError(
316
+ "Shape object has at least one dynamic dimension, but no information is available on 'min' property."
317
+ )
305
318
  return tuple(self._desc.min)
306
319
 
307
320
  @property
@@ -311,12 +324,16 @@ class Shape:
311
324
  """
312
325
  if not self.is_dynamic:
313
326
  raise ValueError("max property is only accessible if is_dynamic is true")
327
+ if not hasattr(self, "_desc"):
328
+ raise AttributeError(
329
+ "Shape object has at least one dynamic dimension, but no information is available on 'max' property."
330
+ )
314
331
  return tuple(self._desc.max)
315
332
 
316
333
  def __setitem__(self, index, val):
317
334
  if index >= self._length:
318
335
  raise IndexError("Index out of range")
319
- self._shapes.desc[index] = val
336
+ self._shapes[index] = val
320
337
 
321
338
 
322
339
  # Descriptor for a tensor
@@ -344,7 +361,7 @@ class TensorDesc:
344
361
  .. code-block:: python
345
362
  :linenos:
346
363
  :caption: Creates a TensorDesc from shape expression of another TensorDesc
347
-
364
+
348
365
  tensor = trt.from_shape_expr(other.shape_expr, dtype=trt.float32)
349
366
  """
350
367
 
@@ -363,7 +380,7 @@ class TensorDesc:
363
380
  def numel(self) -> int:
364
381
  """
365
382
  Returns:
366
- Returns an int with the number of elements of the tensor.
383
+ Returns an int with the number of elements of the tensor.
367
384
 
368
385
  .. warning::
369
386
  Should only be called when TensorDesc.has_shape is true. If a symbolic expression for the number of elements is required, query TensorDesc.shape_expr.numel().
@@ -373,14 +390,14 @@ class TensorDesc:
373
390
  "TensorDesc has no shape information available at this stage. Inspect TensorDesc.has_shape to determine availability."
374
391
  )
375
392
  return int(np.prod(self.shape))
376
-
393
+
377
394
  @property
378
395
  def ndim(self) -> int:
379
396
  """
380
397
  Number of dimensions
381
398
  """
382
399
  return len(self._shape_expr)
383
-
400
+
384
401
  @property
385
402
  def is_size_tensor(self):
386
403
  return False
@@ -389,12 +406,12 @@ class TensorDesc:
389
406
  def like(self) -> "TensorDesc":
390
407
  """
391
408
  Returns:
392
- Returns a TensorDesc which has identical properties to this tensor, and is mutable.
409
+ Returns a TensorDesc which has identical properties to this tensor, and is mutable.
393
410
 
394
411
  .. code-block:: python
395
412
  :linenos:
396
413
  :caption: Communicate that output tensor has identical properties to the input tensor
397
-
414
+
398
415
  @tensorrt.plugin.register("my::plugin")
399
416
  def _(inp: tensorrt.plugin.TensorDesc) -> tensorrt.plugin.TensorDesc:
400
417
  return inp.like()
@@ -414,7 +431,7 @@ class TensorDesc:
414
431
  .. code-block:: python
415
432
  :linenos:
416
433
  :caption: Communicate that output tensor has identical properties to the input tensor
417
-
434
+
418
435
  @tensorrt.plugin.register("my::plugin")
419
436
  def _(inp: tensorrt.plugin.TensorDesc) -> tensorrt.plugin.TensorDesc:
420
437
  return inp.aliased()
@@ -438,7 +455,7 @@ class TensorDesc:
438
455
  raise ValueError(
439
456
  "TensorDesc has no shape information available at this stage. Inspect TensorDesc.has_shape to determine availability."
440
457
  )
441
-
458
+
442
459
  def _validate_not_immutable(self):
443
460
  if hasattr(self, "_immutable") and self._immutable:
444
461
  raise ValueError("Cannot modify immutable TensorDesc")
@@ -446,21 +463,21 @@ class TensorDesc:
446
463
  @property
447
464
  def shape_expr(self) -> ShapeExprs:
448
465
  """
449
- Symbolic expressions for the tensor shape.
466
+ Symbolic expressions for the tensor shape.
450
467
  """
451
468
  return self._shape_expr
452
469
 
453
470
  @property
454
471
  def dtype(self) -> trt.DataType:
455
472
  """
456
- Data type of the tensor.
473
+ Data type of the tensor.
457
474
  """
458
475
  return self._dtype
459
-
476
+
460
477
  @property
461
478
  def shape(self) -> Shape:
462
479
  """
463
- The (concrete) shape of the tensor.
480
+ The (concrete) shape of the tensor.
464
481
 
465
482
  .. warning::
466
483
  Only accessible when TensorDesc.has_shape is true.
@@ -471,7 +488,7 @@ class TensorDesc:
471
488
  @property
472
489
  def format(self) -> trt.TensorFormat:
473
490
  """
474
- The format of the tensor.
491
+ The format of the tensor.
475
492
 
476
493
  .. warning::
477
494
  Only accessible when TensorDesc.has_shape is true.
@@ -482,15 +499,15 @@ class TensorDesc:
482
499
  @property
483
500
  def scale(self) -> float:
484
501
  """
485
- Scale for INT8 data type.
502
+ Scale for INT8 data type.
486
503
 
487
504
  .. warning::
488
505
  Only accessible when TensorDesc.has_shape is true.
489
506
  """
490
507
  self._validate_has_shape()
491
508
  return self._scale
492
-
493
-
509
+
510
+
494
511
  @shape_expr.setter
495
512
  def shape_expr(self, value):
496
513
  self._shape_expr = value
@@ -498,7 +515,7 @@ class TensorDesc:
498
515
  @dtype.setter
499
516
  def dtype(self, value):
500
517
  self._dtype = value
501
-
518
+
502
519
  @shape.setter
503
520
  def shape(self, value):
504
521
  self._validate_not_immutable()
@@ -571,11 +588,11 @@ class SizeTensorDesc(TensorDesc):
571
588
  self._upper_bound = upper_bound
572
589
  self._index = None
573
590
  self._expr = SizeTensorShapeExpr(self)
574
-
591
+
575
592
  @property
576
593
  def is_size_tensor(self):
577
594
  return True
578
-
595
+
579
596
  @property
580
597
  def opt(self) -> ShapeExpr:
581
598
  """
@@ -596,7 +613,7 @@ class SizeTensorDesc(TensorDesc):
596
613
  Output index at which this size tensor resides
597
614
  """
598
615
  return self._index
599
-
616
+
600
617
  def _set_index(self, idx: int):
601
618
  self._index = idx
602
619
 
@@ -637,21 +654,21 @@ class Tensor:
637
654
  Number of dimensions
638
655
  """
639
656
  return len(self._shape)
640
-
657
+
641
658
  @property
642
659
  def data_ptr(self) -> int:
643
660
  """
644
661
  Pointer to the data buffer of this tensor
645
662
  """
646
663
  return self._data_ptr
647
-
664
+
648
665
  @property
649
666
  def dtype(self) -> trt.DataType:
650
667
  """
651
- Data type of the tensor.
668
+ Data type of the tensor.
652
669
  """
653
670
  return self._dtype
654
-
671
+
655
672
  @property
656
673
  def shape(self) -> Shape:
657
674
  """
@@ -672,7 +689,7 @@ class Tensor:
672
689
  Scale for INT8 data type.
673
690
  """
674
691
  return self._scale
675
-
692
+
676
693
  @property
677
694
  def strides(self) -> Tuple[int]:
678
695
  """
@@ -683,11 +700,11 @@ class Tensor:
683
700
  @data_ptr.setter
684
701
  def data_ptr(self, value):
685
702
  self._data_ptr = value
686
-
703
+
687
704
  @dtype.setter
688
705
  def dtype(self, value):
689
706
  self._dtype = value
690
-
707
+
691
708
  @shape.setter
692
709
  def shape(self, value):
693
710
  self._shape = value
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
- Name: tensorrt-cu12_bindings
3
- Version: 10.6.0.post2
2
+ Name: tensorrt_cu12_bindings
3
+ Version: 10.7.0.post1
4
4
  Summary: A high performance deep learning inference library
5
5
  Home-page: https://github.com/nvidia/tensorrt
6
6
  Download-URL: https://developer.nvidia.com/tensorrt
@@ -0,0 +1,17 @@
1
+ tensorrt_bindings/__init__.py,sha256=Y24vpa4rxvmISEkDFeu8BJgHAAnmwV-SGHKF86wYR5o,5892
2
+ tensorrt_bindings/tensorrt.cp310-win_amd64.pyd,sha256=T4Ftb939k0o_cRezMOgA8YSeCxf_CQ3Rgup9w4L0134,2596352
3
+ tensorrt_bindings/plugin/__init__.py,sha256=28b1lyihZnjVIJzh1h2Za_XSb5nJXOBS9w8LyD0WyLw,1558
4
+ tensorrt_bindings/plugin/_autotune.py,sha256=xlNut0qB9rlgyhfV4QyVJEsT50r3PuFz1xk0pnDiVA8,12493
5
+ tensorrt_bindings/plugin/_export.py,sha256=xJE2C9TTX-ons81GUBYbf4djv44bpyi0RzhzJlxJo4I,1189
6
+ tensorrt_bindings/plugin/_lib.py,sha256=PfnV11UPHhadsTosIqgQBOpbx0pCfzHjXB6rS_xZ-gc,21378
7
+ tensorrt_bindings/plugin/_plugin_class.py,sha256=6AZKcpES3D8l8VSq0691Fmb1yeTvfiJazK861Lm1_qw,12145
8
+ tensorrt_bindings/plugin/_tensor.py,sha256=BefibyFqrY1Vi4K1Yqk6CRda8Nn1cs6lDMRV4dugIX0,28136
9
+ tensorrt_bindings/plugin/_top_level.py,sha256=mxZk0M-v8aP1uMVziX6FDBxFQPq3Cp6gd0Iq09xRUro,4708
10
+ tensorrt_bindings/plugin/_utils.py,sha256=Hl2PslERH5X0UMArk_k8GKag7ME0pW0RjQcTX3zYsoc,2741
11
+ tensorrt_bindings/plugin/_validate.py,sha256=nHDLvekos2hI5fDoU6KhDeNQh_NdmN3NRM2xWhyanuY,14477
12
+ tensorrt_cu12_bindings-10.7.0.post1.dist-info/LICENSE.txt,sha256=yGkV_ZW7773aMTWqzj5q1rRhKEbcvbxdL1o4sTndiLQ,47141
13
+ tensorrt_cu12_bindings-10.7.0.post1.dist-info/METADATA,sha256=SjIOccD0yPfvX7vido9xh_ppWOiFVf-AaT5OyV8txJg,609
14
+ tensorrt_cu12_bindings-10.7.0.post1.dist-info/WHEEL,sha256=xKD-W076Kxa9P8HVHMBFDAZ44LgNHrPjF081MKvpixU,100
15
+ tensorrt_cu12_bindings-10.7.0.post1.dist-info/top_level.txt,sha256=QuFeuaCbu20Zk7dFQs6JlSlk-ZLCkirage8XegBmyP0,18
16
+ tensorrt_cu12_bindings-10.7.0.post1.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
17
+ tensorrt_cu12_bindings-10.7.0.post1.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- tensorrt_bindings/__init__.py,sha256=6Mz1oI_DGWpN4OExVo75l13j1wxG_80xqtPf40IxvoU,5892
2
- tensorrt_bindings/tensorrt.cp310-win_amd64.pyd,sha256=tU8nNRcCBvdAD032JxYbAC6mesHr3aAbjVEgX0T3Ojg,2569216
3
- tensorrt_bindings/plugin/__init__.py,sha256=F40ugfl_9EsELSySM9rZYONsKndBXcisSiXq7buMkEs,1574
4
- tensorrt_bindings/plugin/_autotune.py,sha256=xlNut0qB9rlgyhfV4QyVJEsT50r3PuFz1xk0pnDiVA8,12493
5
- tensorrt_bindings/plugin/_export.py,sha256=T1UqMA_Fl0AERB_3k2r3CHSTLMUVdp9NNtuHeWyK_1w,1047
6
- tensorrt_bindings/plugin/_lib.py,sha256=PfnV11UPHhadsTosIqgQBOpbx0pCfzHjXB6rS_xZ-gc,21378
7
- tensorrt_bindings/plugin/_plugin_class.py,sha256=kddkWnEBuq8jHn0lX5n_kyfNirqw_unH0YNu1tjX70g,12005
8
- tensorrt_bindings/plugin/_tensor.py,sha256=b0XlxDI4rjzepknVf36UGaC0eTZrYIV856msXbIRjWc,27325
9
- tensorrt_bindings/plugin/_top_level.py,sha256=mxZk0M-v8aP1uMVziX6FDBxFQPq3Cp6gd0Iq09xRUro,4708
10
- tensorrt_bindings/plugin/_utils.py,sha256=Hl2PslERH5X0UMArk_k8GKag7ME0pW0RjQcTX3zYsoc,2741
11
- tensorrt_bindings/plugin/_validate.py,sha256=nHDLvekos2hI5fDoU6KhDeNQh_NdmN3NRM2xWhyanuY,14477
12
- tensorrt_cu12_bindings-10.6.0.post2.dist-info/LICENSE.txt,sha256=yGkV_ZW7773aMTWqzj5q1rRhKEbcvbxdL1o4sTndiLQ,47141
13
- tensorrt_cu12_bindings-10.6.0.post2.dist-info/METADATA,sha256=_yMhCN-qWygHMAZxPU3Tn4pszAkmzDWAdFo3itNseSs,609
14
- tensorrt_cu12_bindings-10.6.0.post2.dist-info/WHEEL,sha256=xKD-W076Kxa9P8HVHMBFDAZ44LgNHrPjF081MKvpixU,100
15
- tensorrt_cu12_bindings-10.6.0.post2.dist-info/top_level.txt,sha256=QuFeuaCbu20Zk7dFQs6JlSlk-ZLCkirage8XegBmyP0,18
16
- tensorrt_cu12_bindings-10.6.0.post2.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
17
- tensorrt_cu12_bindings-10.6.0.post2.dist-info/RECORD,,