MCPcopy Create free account
hub / github.com/apache/tvm-ffi / create_object

Function create_object

python/tvm_ffi/testing/testing.py:163–188  ·  view source on GitHub ↗

Make an object by reflection. Parameters ---------- type_key The type key of the object. kwargs The keyword arguments to the object. Returns ------- obj The created object. Note ---- This function is only used for testing purposes an

(type_key: str, **kwargs: Any)

Source from the content-addressed store, hash-verified

161
162
163def create_object(type_key: str, **kwargs: Any) -> Object:
164 """Make an object by reflection.
165
166 Parameters
167 ----------
168 type_key
169 The type key of the object.
170 kwargs
171 The keyword arguments to the object.
172
173 Returns
174 -------
175 obj
176 The created object.
177
178 Note
179 ----
180 This function is only used for testing purposes and should
181 not be used in other cases.
182
183 """
184 args = [type_key]
185 for k, v in kwargs.items():
186 args.append(k)
187 args.append(v)
188 return _ffi_api.MakeObjectFromPackedArgs(*args)
189
190
191def make_unregistered_object() -> Object:

Calls 2

appendMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected