Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open source ivy's transpiler #28849

Merged
merged 35 commits into from
Jan 7, 2025
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4d2000e
add transpiler files
Sam-Armstrong Dec 12, 2024
9de183d
remove sourcecode license logic
Sam-Armstrong Dec 12, 2024
80ec868
update import name references
Sam-Armstrong Dec 12, 2024
baac48e
remove compiler/
Sam-Armstrong Dec 12, 2024
47cc20b
update compiler references
Sam-Armstrong Dec 12, 2024
4008f2c
add graph tracer
Sam-Armstrong Dec 14, 2024
51dc977
add ivy.trace_graph to __init__
Sam-Armstrong Dec 14, 2024
1dab0b2
docs: adding a README for the source-to-source transpiler
Sam-Armstrong Dec 16, 2024
f09d694
docs: added README for the core transformations/ submodule
Sam-Armstrong Dec 16, 2024
faaa034
docs: added README for the tracer/ submodule
Sam-Armstrong Dec 16, 2024
bb46a72
add tracer tests
Sam-Armstrong Dec 16, 2024
f3d3886
add transpiler tests
Sam-Armstrong Dec 16, 2024
034a5b0
chore: cleaning up `CONTRIBUTING.md`
YushaArif99 Dec 17, 2024
616baed
docs: adding transpiler tasks to `CONTRIBUTING.md` [skip ci]
YushaArif99 Dec 17, 2024
2e60708
add first transpiler tests to ci
Sam-Armstrong Dec 18, 2024
1f4490e
fix: transpiler import path bugs
Sam-Armstrong Dec 18, 2024
0dd776a
add ivy.module
Sam-Armstrong Dec 18, 2024
6bda842
remove caching 'get_ivy_root' dependency on tracing_caching
Sam-Armstrong Dec 18, 2024
df5ade0
change to using relative imports within the transpiler
Sam-Armstrong Dec 18, 2024
6d9147c
remove continue-on-error from transpiler tests
Sam-Armstrong Jan 2, 2025
8ee0f66
add translations, module, sourcegen tests to ci
Sam-Armstrong Jan 2, 2025
c6b7656
add kornia and hf tests to ci
Sam-Armstrong Jan 2, 2025
a6704ee
lint
Sam-Armstrong Jan 2, 2025
585e1dd
switch to running transpiler ci tests via shell script
Sam-Armstrong Jan 2, 2025
3bb56e1
add missing datasets and transformers installs to script
Sam-Armstrong Jan 2, 2025
cfc2aab
remove 'inplace' arg from module tests
Sam-Armstrong Jan 2, 2025
ffa698e
only run transpiler ci on push/pr to main
Sam-Armstrong Jan 2, 2025
8f1b24b
remove redundant functionality
Sam-Armstrong Jan 2, 2025
e7ff42b
add control_flow_experimental/
Sam-Armstrong Jan 2, 2025
391d4ac
change tracer to use relative imports
Sam-Armstrong Jan 2, 2025
1cfce5d
remove publish binaries step from release workflow
Sam-Armstrong Jan 4, 2025
5b50c11
remove loading binaries from release pipeline
Sam-Armstrong Jan 4, 2025
966615a
fix: don't pull the binaries when running the integration tests
Sam-Armstrong Jan 4, 2025
fe7fe71
fix: don't pass binaries branch to integration tests workflows
Sam-Armstrong Jan 4, 2025
e0f4a61
fix: remove test dispatcher functionality from test_translations
Sam-Armstrong Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update compiler references
  • Loading branch information
Sam-Armstrong committed Dec 12, 2024
commit 47cc20bfee4fc32cb93f72badc539af536fdebb0
22 changes: 8 additions & 14 deletions ivy/__init__.py
Original file line number Diff line number Diff line change
@@ -804,24 +804,18 @@ class Node(str):
except: # noqa: E722
pass
try:
from .compiler.compiler import (
clear_graph_cache,
from .transpiler import (
source_to_source,
transpile,
trace_graph,
)
except: # noqa: E722
pass # Added for the finally statement
try:
from .compiler.replace_with import replace_with, transform_function
except: # noqa: E722
pass
finally:
# Skip framework imports done by Ivy compiler for now
for backend_framework in _not_imported_backends.copy():
if backend_framework in sys.modules:
if backend_framework not in _imported_frameworks_before_compiler:
_not_imported_backends.remove(backend_framework)

# Skip framework imports done by Ivy compiler for now
for backend_framework in _not_imported_backends.copy():
if backend_framework in sys.modules:
if backend_framework not in _imported_frameworks_before_compiler:
_not_imported_backends.remove(backend_framework)


# add instance methods to Ivy Array and Container
@@ -1189,7 +1183,7 @@ def unset_dynamic_backend():


@handle_exceptions
def set_cython_wrappers_mode(flag: bool = True) -> None:
def set_cython_wrappers_mode(flag=True) -> None:
"""Set the mode of whether to use cython wrappers for functions.

Parameter