From eeb6f0aa6189e44f49e46988319506112e0b1187 Mon Sep 17 00:00:00 2001 From: Sam Armstrong <88863522+Sam-Armstrong@users.noreply.github.com> Date: Fri, 26 Jul 2024 04:05:09 +0100 Subject: [PATCH] Update compiler.py ed41787 Co-authored-by: ivy-dev-bot --- binaries.json | 8 ++++++-- ivy/compiler/compiler.py | 17 +++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/binaries.json b/binaries.json index c9eb6cde7206..011223d7356a 100644 --- a/binaries.json +++ b/binaries.json @@ -12,7 +12,6 @@ "CM", "CV", "CX", - "D", "DC", "DD", "DI", @@ -95,6 +94,9 @@ "MX", "V", "VC", + "VCI", + "VCV", + "VCX", "VD", "VI", "VIC", @@ -106,8 +108,10 @@ "VIX", "VL", "VLC", + "VLD", "VLI", "VLL", + "VLM", "VLV", "VLX", "VM", @@ -139,4 +143,4 @@ } ] } -} +} \ No newline at end of file diff --git a/ivy/compiler/compiler.py b/ivy/compiler/compiler.py index fb1ba085e982..6390134c580c 100644 --- a/ivy/compiler/compiler.py +++ b/ivy/compiler/compiler.py @@ -16,16 +16,14 @@ def source_to_source( as well e.g. (source="torch_frontend", target="ivy") or (source="torch_frontend", target="tensorflow") etc. Args: - ---- object: The object (class/function) to be translated. source (str, optional): The source framework. Defaults to 'torch'. target (str, optional): The target framework. Defaults to 'torch_frontend'. profiling: Whether to add performance profiling. Returns: - ------- - The translated object. - """ + The translated object.""" + from ._compiler import source_to_source as _source_to_source return _source_to_source( @@ -56,8 +54,7 @@ def trace_graph( params_v=None, v=None ): - """Takes `fn` and traces it into a more efficient composition of backend - operations. + """Takes `fn` and traces it into a more efficient composition of backend operations. Parameters ---------- @@ -127,8 +124,8 @@ def trace_graph( >>> start = time.time() >>> graph(x) >>> print(time.time() - start) - 0.0001785755157470703 - """ + 0.0001785755157470703""" + from ._compiler import trace_graph as _trace_graph return _trace_graph( @@ -192,8 +189,8 @@ def transpile( Returns ------- - Either a transpiled Graph or a non-initialized LazyGraph. - """ + Either a transpiled Graph or a non-initialized LazyGraph.""" + from ._compiler import transpile as _transpile return _transpile(