Lines Matching defs:callback
136 # Test callback
139 # Define a callback function that takes a float and an integer and returns a float.
141 def callback(a, b):
156 execution_engine.register_runtime("some_callback_into_python", callback)
173 # Test callback with an unranked memref
176 # Define a callback function that takes an unranked memref, converts it to a numpy array and prints it.
178 def callback(a):
180 log("Inside callback: ")
195 execution_engine.register_runtime("some_callback_into_python", callback)
197 # CHECK: Inside callback:
208 # CHECK: Inside callback:
221 # Test callback with a ranked memref.
224 # Define a callback function that takes a ranked memref, converts it to a numpy array and prints it.
231 def callback(a):
248 execution_engine.register_runtime("some_callback_into_python", callback)
262 # Test callback with a ranked memref with non-zero offset.
265 # Define a callback function that takes a ranked memref, converts it to a numpy array and prints it.
272 def callback(a):
278 # The module takes a subview of the argument memref and calls the callback with it
292 execution_engine.register_runtime("some_callback_into_python", callback)
305 # Test callback with an unranked memref with non-zero offset
308 # Define a callback function that takes an unranked memref, converts it to a numpy array and prints it.
310 def callback(a):
312 log("Inside callback: ")
317 # calls the callback with it.
331 execution_engine.register_runtime("some_callback_into_python", callback)
333 # CHECK: Inside callback: