Execute 'fn' as a compiled XLA kernel, with 'inputs'.
(fn, *inputs, **kwargs)
| 55 | |
| 56 | |
| 57 | def CompiledKernel(fn, *inputs, **kwargs): |
| 58 | """Execute 'fn' as a compiled XLA kernel, with 'inputs'.""" |
| 59 | name = kwargs.pop("name", None) |
| 60 | noinline = kwargs.pop("noinline", None) |
| 61 | |
| 62 | @function.Defun(func_name=name, noinline=noinline, compiled=True) |
| 63 | def Compiled(*args): |
| 64 | return fn(*args) |
| 65 | |
| 66 | return Compiled(*inputs) |
| 67 | |
| 68 | |
| 69 | def RunMetadataLabels(run_metadata): |