├── priv └── VERSION ├── .tool-versions ├── embedded_devices └── live_nx_iree │ ├── priv │ ├── repo │ │ ├── migrations │ │ │ └── .formatter.exs │ │ └── seeds.exs │ └── static │ │ ├── favicon.ico │ │ └── robots.txt │ ├── test │ ├── test_helper.exs │ ├── live_nx_iree_web │ │ └── controllers │ │ │ ├── page_controller_test.exs │ │ │ ├── error_json_test.exs │ │ │ └── error_html_test.exs │ └── support │ │ ├── conn_case.ex │ │ └── data_case.ex │ ├── lib │ ├── live_nx_iree │ │ ├── mailer.ex │ │ ├── repo.ex │ │ └── application.ex │ ├── live_nx_iree_web │ │ ├── live │ │ │ ├── home_live │ │ │ │ └── home_live.html.heex │ │ │ ├── camera_live │ │ │ │ └── camera_live.html.heex │ │ │ ├── home_live.swiftui.ex │ │ │ ├── camera_live.swiftui.ex │ │ │ └── swiftui │ │ │ │ ├── home_live.swiftui.neex │ │ │ │ └── camera_live.swiftui.neex │ │ ├── components │ │ │ ├── layouts_swiftui │ │ │ │ ├── app.swiftui.neex │ │ │ │ └── root.swiftui.neex │ │ │ ├── layouts.swiftui.ex │ │ │ ├── layouts.ex │ │ │ └── layouts │ │ │ │ ├── root.html.heex │ │ │ │ └── app.html.heex │ │ ├── controllers │ │ │ ├── page_controller.ex │ │ │ ├── page_html.ex │ │ │ ├── error_json.ex │ │ │ └── error_html.ex │ │ ├── gettext.ex │ │ ├── styles │ │ │ └── app.swiftui.ex │ │ ├── router.ex │ │ └── endpoint.ex │ └── live_nx_iree.ex │ ├── native │ └── swiftui │ │ ├── LiveNxIREE │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── 128-mac.png │ │ │ │ ├── 16-mac.png │ │ │ │ ├── 256-mac.png │ │ │ │ ├── 32-mac.png │ │ │ │ ├── 512-mac.png │ │ │ │ ├── 64-mac.png │ │ │ │ ├── AppIcon.jpg │ │ │ │ ├── 1024-mac.png │ │ │ │ ├── 256-mac 1.png │ │ │ │ ├── 32-mac 1.png │ │ │ │ ├── 512-mac 1.png │ │ │ │ ├── AppIcon 1.jpg │ │ │ │ └── Contents.json │ │ ├── Preview Content │ │ │ └── Preview Assets.xcassets │ │ │ │ └── Contents.json │ │ ├── nx_iree │ │ │ ├── lib │ │ │ │ ├── host │ │ │ │ │ └── libnx_iree_runtime.so │ │ │ │ ├── ios │ │ │ │ │ └── libnx_iree_runtime.so │ │ │ │ ├── tvos │ │ │ │ │ └── libnx_iree_runtime.so │ │ │ │ ├── visionos │ │ │ │ │ └── libnx_iree_runtime.so │ │ │ │ ├── ios_simulator │ │ │ │ │ └── libnx_iree_runtime.so │ │ │ │ ├── tvos_simulator │ │ │ │ │ └── libnx_iree_runtime.so │ │ │ │ └── visionos_simulator │ │ │ │ │ └── libnx_iree_runtime.so │ │ │ └── include │ │ │ │ └── iree │ │ │ │ ├── hal │ │ │ │ ├── drivers │ │ │ │ │ ├── cuda │ │ │ │ │ │ ├── cuda_headers.h │ │ │ │ │ │ ├── nccl_headers.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ └── cuda_allocator.h │ │ │ │ │ ├── hip │ │ │ │ │ │ ├── rccl_headers.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ ├── hip_allocator.h │ │ │ │ │ │ └── hip_headers.h │ │ │ │ │ ├── vulkan │ │ │ │ │ │ ├── vulkan_driver.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── native_event.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ ├── native_allocator.h │ │ │ │ │ │ ├── vulkan_device.h │ │ │ │ │ │ ├── direct_command_queue.h │ │ │ │ │ │ ├── debug_reporter.h │ │ │ │ │ │ ├── sparse_buffer.h │ │ │ │ │ │ └── native_semaphore.h │ │ │ │ │ ├── metal │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ ├── metal_device.h │ │ │ │ │ │ ├── metal_buffer.h │ │ │ │ │ │ ├── direct_allocator.h │ │ │ │ │ │ └── shared_event.h │ │ │ │ │ ├── local_sync │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── sync_event.h │ │ │ │ │ │ ├── sync_driver.h │ │ │ │ │ │ └── sync_device.h │ │ │ │ │ ├── local_task │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── task_event.h │ │ │ │ │ │ ├── task_queue_state.h │ │ │ │ │ │ └── task_driver.h │ │ │ │ │ └── init.h │ │ │ │ ├── utils │ │ │ │ │ ├── libmpi_dynamic_symbols.h │ │ │ │ │ ├── debug_allocator.h │ │ │ │ │ ├── allocators.h │ │ │ │ │ └── mpi_channel_provider.h │ │ │ │ ├── local │ │ │ │ │ ├── executable_environment.h │ │ │ │ │ ├── loaders │ │ │ │ │ │ ├── embedded_elf_loader.h │ │ │ │ │ │ ├── system_library_loader.h │ │ │ │ │ │ └── static_library_loader.h │ │ │ │ │ ├── local_executable_cache.h │ │ │ │ │ ├── plugins │ │ │ │ │ │ └── static_plugin.h │ │ │ │ │ └── executable_library_demo.h │ │ │ │ ├── queue.h │ │ │ │ ├── api.h │ │ │ │ └── buffer_heap_impl.h │ │ │ │ ├── builtins │ │ │ │ └── ukernel │ │ │ │ │ ├── tools │ │ │ │ │ ├── memcpy_benchmark.h │ │ │ │ │ ├── benchmark.h │ │ │ │ │ └── test.h │ │ │ │ │ ├── api.h │ │ │ │ │ ├── arch │ │ │ │ │ ├── arm_64 │ │ │ │ │ │ ├── unpack_arm_64_internal.h │ │ │ │ │ │ ├── mmt4d_arm_64_internal.h │ │ │ │ │ │ └── pack_arm_64_internal.h │ │ │ │ │ └── x86_64 │ │ │ │ │ │ ├── unpack_x86_64_internal.h │ │ │ │ │ │ ├── mmt4d_x86_64_internal.h │ │ │ │ │ │ └── pack_x86_64_internal.h │ │ │ │ │ ├── unpack.h │ │ │ │ │ ├── query_tile_sizes_internal.h │ │ │ │ │ ├── query_tile_sizes.h │ │ │ │ │ ├── mmt4d.h │ │ │ │ │ └── pack.h │ │ │ │ ├── testing │ │ │ │ └── gtest.h │ │ │ │ ├── base │ │ │ │ ├── internal │ │ │ │ │ ├── time.h │ │ │ │ │ └── flatcc │ │ │ │ │ │ ├── building.h │ │ │ │ │ │ ├── parsing.h │ │ │ │ │ │ └── debugging.h │ │ │ │ └── loop_emscripten.h │ │ │ │ ├── runtime │ │ │ │ └── api.h │ │ │ │ ├── modules │ │ │ │ ├── check │ │ │ │ │ └── module.h │ │ │ │ ├── vmvx │ │ │ │ │ └── module.h │ │ │ │ ├── io │ │ │ │ │ └── parameters │ │ │ │ │ │ └── module.h │ │ │ │ └── hal │ │ │ │ │ ├── loader │ │ │ │ │ └── module.h │ │ │ │ │ ├── inline │ │ │ │ │ └── module.h │ │ │ │ │ ├── utils │ │ │ │ │ └── buffer_diagnostics.h │ │ │ │ │ └── module.h │ │ │ │ ├── io │ │ │ │ ├── formats │ │ │ │ │ ├── irpa │ │ │ │ │ │ └── irpa_parser.h │ │ │ │ │ ├── gguf │ │ │ │ │ │ └── gguf_parser.h │ │ │ │ │ ├── parser_registry.h │ │ │ │ │ └── safetensors │ │ │ │ │ │ └── safetensors_parser.h │ │ │ │ ├── memory_stream.h │ │ │ │ ├── scope_map.h │ │ │ │ ├── parameter_index_provider.h │ │ │ │ └── vec_stream.h │ │ │ │ ├── tooling │ │ │ │ ├── instrument_util.h │ │ │ │ ├── parameter_util.h │ │ │ │ ├── modules │ │ │ │ │ └── resolver.h │ │ │ │ ├── comparison.h │ │ │ │ └── function_util.h │ │ │ │ └── vm │ │ │ │ ├── bytecode │ │ │ │ ├── module.h │ │ │ │ ├── archive.h │ │ │ │ ├── utils │ │ │ │ │ └── features.h │ │ │ │ └── verifier.h │ │ │ │ ├── api.h │ │ │ │ ├── ops_emitc.h │ │ │ │ ├── shims_emitc.h │ │ │ │ └── dynamic │ │ │ │ └── module.h │ │ ├── NxIREECppBridge.swift │ │ ├── LiveNxIREE.swift │ │ ├── ConnectingView.swift │ │ ├── LiveNxIREE-Bridging-Header.h │ │ ├── DisconnectedView.swift │ │ ├── ContentView.swift │ │ ├── NxAddon │ │ │ └── ImageView.swift │ │ ├── c_src │ │ │ └── nx_iree.h │ │ └── ReconnectingView.swift │ │ ├── BuildArtifacts │ │ └── libnx_iree_runtime.so │ │ └── LiveNxIREE.xcodeproj │ │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ └── paulo.valente.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ └── paulo.valente.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist │ ├── assets │ ├── css │ │ └── app.css │ └── js │ │ └── app.js │ ├── .formatter.exs │ ├── install_nx_iree.sh │ ├── README.md │ ├── config │ ├── prod.exs │ └── test.exs │ └── .gitignore ├── config └── config.exs ├── .formatter.exs ├── CHANGELOG.md ├── scripts ├── build_linux.sh ├── build_mac_arm.sh └── clone_iree.sh ├── lib ├── nx_iree │ ├── application.ex │ ├── module.ex │ ├── native.ex │ └── mix_helpers.exs └── mix │ └── tasks │ └── nx_iree │ └── native_download.ex ├── test ├── test_helper.exs └── nx_iree │ ├── native_test.exs │ └── nx_test.exs ├── README.md ├── .gitignore ├── compiler.exs ├── cmake ├── CMakeLists.txt └── modules │ └── default │ └── CMakeLists.txt ├── axon.exs └── run.exs /priv/VERSION: -------------------------------------------------------------------------------- 1 | 0.0.2-pre.0 -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | elixir 1.17.0-otp-26 2 | erlang 26.0.2 3 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/priv/repo/migrations/.formatter.exs: -------------------------------------------------------------------------------- 1 | [ 2 | import_deps: [:ecto_sql], 3 | inputs: ["*.exs"] 4 | ] 5 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | Ecto.Adapters.SQL.Sandbox.mode(LiveNxIREE.Repo, :manual) 3 | -------------------------------------------------------------------------------- /config/config.exs: -------------------------------------------------------------------------------- 1 | import Config 2 | 3 | if config_env() == :test do 4 | config :nx_iree, :add_backend_on_inspect, false 5 | end 6 | -------------------------------------------------------------------------------- /.formatter.exs: -------------------------------------------------------------------------------- 1 | # Used by "mix format" 2 | [ 3 | inputs: ["{mix,.formatter}.exs", "{liveview_native,config,lib,test}/**/*.{ex,exs}"] 4 | ] 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v0.0.1 (2024-10-04) 4 | 5 | First release, including an Nx.Defn compiler and companion Nx.Backend. 6 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree/mailer.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREE.Mailer do 2 | use Swoosh.Mailer, otp_app: :live_nx_iree 3 | end 4 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/live/home_live/home_live.html.heex: -------------------------------------------------------------------------------- 1 | <.header> 2 | Listing Contexts 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/components/layouts_swiftui/app.swiftui.neex: -------------------------------------------------------------------------------- 1 | <.flash_group flash={@flash} /> 2 | <%= @inner_content %> -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/live/camera_live/camera_live.html.heex: -------------------------------------------------------------------------------- 1 | <.header> 2 | Listing Contexts 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/priv/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elixir-nx/nx_iree/HEAD/embedded_devices/live_nx_iree/priv/static/favicon.ico -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/native/swiftui/LiveNxIREE/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree/repo.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREE.Repo do 2 | use Ecto.Repo, 3 | otp_app: :live_nx_iree, 4 | adapter: Ecto.Adapters.Postgres 5 | end 6 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/live/home_live.swiftui.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREEWeb.HomeLive.SwiftUI do 2 | use LiveNxIREENative, [:render_component, format: :swiftui] 3 | end 4 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/native/swiftui/LiveNxIREE/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/live/camera_live.swiftui.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREEWeb.CameraLive.SwiftUI do 2 | use LiveNxIREENative, [:render_component, format: :swiftui] 3 | end 4 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/assets/css/app.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss/base"; 2 | @import "tailwindcss/components"; 3 | @import "tailwindcss/utilities"; 4 | 5 | /* This file is for your main application CSS */ 6 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/native/swiftui/BuildArtifacts/libnx_iree_runtime.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elixir-nx/nx_iree/HEAD/embedded_devices/live_nx_iree/native/swiftui/BuildArtifacts/libnx_iree_runtime.so -------------------------------------------------------------------------------- /scripts/build_linux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | for IREE_BUILD_TARGET in "host" 4 | do 5 | 6 | SCRIPT_DIR=$(dirname "$0") 7 | 8 | ${SCRIPT_DIR}/build_and_package.sh --target=${IREE_BUILD_TARGET} 9 | 10 | done -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/components/layouts.swiftui.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREEWeb.Layouts.SwiftUI do 2 | use LiveNxIREENative, [:layout, format: :swiftui] 3 | 4 | embed_templates "layouts_swiftui/*" 5 | end 6 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/components/layouts_swiftui/root.swiftui.neex: -------------------------------------------------------------------------------- 1 | <.csrf_token /> 2 |