MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / __getattribute__

Method __getattribute__

tensorrt_llm/plugin/plugin.py:297–308  ·  view source on GitHub ↗

Override to resolve 'auto' values to dtype field. When a plugin field has value 'auto', return the value of dtype instead.

(self, name: str)

Source from the content-addressed store, hash-verified

295 "ReduceScatter + AllGather targeting large MoE models.")
296
297 def __getattribute__(self, name: str) -> Any:
298 """Override to resolve 'auto' values to dtype field.
299
300 When a plugin field has value 'auto', return the value of dtype instead.
301 """
302 # Use object.__getattribute__ to avoid infinite recursion
303 value = object.__getattribute__(self, name)
304
305 if name != "dtype" and value == "auto":
306 return self.dtype
307
308 return value
309
310 @field_validator("dtype")
311 @classmethod

Callers 6

to_onnxMethod · 0.45
to_dictMethod · 0.45
__setattr__Method · 0.45
__getattr__Method · 0.45
_is_llm_responseMethod · 0.45
__getattr__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected