├── .formatter.exs ├── .github └── workflows │ ├── embedded_devices.yml │ └── precompiled_nif.yml ├── .gitignore ├── .tool-versions ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── axon.exs ├── c_src └── nx_iree.cc ├── cmake ├── CMakeLists.txt ├── modules │ ├── default │ │ └── CMakeLists.txt │ └── emscripten │ │ └── CMakeLists.txt └── src │ ├── emscripten_api.cc │ ├── emscripten_api.h │ ├── runtime.cc │ └── runtime.h ├── compiler.exs ├── config └── config.exs ├── embedded_devices └── live_nx_iree │ ├── .formatter.exs │ ├── .gitignore │ ├── README.md │ ├── assets │ ├── css │ │ └── app.css │ ├── js │ │ └── app.js │ ├── tailwind.config.js │ └── vendor │ │ └── topbar.js │ ├── config │ ├── config.exs │ ├── dev.exs │ ├── prod.exs │ ├── runtime.exs │ └── test.exs │ ├── install_nx_iree.sh │ ├── lib │ ├── live_nx_iree.ex │ ├── live_nx_iree │ │ ├── application.ex │ │ ├── mailer.ex │ │ └── repo.ex │ ├── live_nx_iree_native.ex │ ├── live_nx_iree_web.ex │ └── live_nx_iree_web │ │ ├── components │ │ ├── core_components.ex │ │ ├── core_components.swiftui.ex │ │ ├── layouts.ex │ │ ├── layouts.swiftui.ex │ │ ├── layouts │ │ │ ├── app.html.heex │ │ │ └── root.html.heex │ │ └── layouts_swiftui │ │ │ ├── app.swiftui.neex │ │ │ └── root.swiftui.neex │ │ ├── controllers │ │ ├── error_html.ex │ │ ├── error_json.ex │ │ ├── page_controller.ex │ │ ├── page_html.ex │ │ └── page_html │ │ │ └── home.html.heex │ │ ├── endpoint.ex │ │ ├── gettext.ex │ │ ├── live │ │ ├── camera_live.swiftui.ex │ │ ├── camera_live │ │ │ ├── camera_live.ex │ │ │ └── camera_live.html.heex │ │ ├── home_live.swiftui.ex │ │ ├── home_live │ │ │ ├── home_live.ex │ │ │ └── home_live.html.heex │ │ └── swiftui │ │ │ ├── camera_live.swiftui.neex │ │ │ └── home_live.swiftui.neex │ │ ├── router.ex │ │ ├── styles │ │ └── app.swiftui.ex │ │ └── telemetry.ex │ ├── mix.exs │ ├── mix.lock │ ├── native │ └── swiftui │ │ ├── BuildArtifacts │ │ └── libnx_iree_runtime.so │ │ ├── LiveNxIREE.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ ├── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ │ └── Package.resolved │ │ │ └── xcuserdata │ │ │ │ └── paulo.valente.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── paulo.valente.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ │ └── LiveNxIREE │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 1024-mac.png │ │ │ ├── 128-mac.png │ │ │ ├── 16-mac.png │ │ │ ├── 256-mac 1.png │ │ │ ├── 256-mac.png │ │ │ ├── 32-mac 1.png │ │ │ ├── 32-mac.png │ │ │ ├── 512-mac 1.png │ │ │ ├── 512-mac.png │ │ │ ├── 64-mac.png │ │ │ ├── AppIcon 1.jpg │ │ │ ├── AppIcon.jpg │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── ConnectingView.swift │ │ ├── ContentView.swift │ │ ├── DisconnectedView.swift │ │ ├── ErrorView.swift │ │ ├── LiveNxIREE-Bridging-Header.h │ │ ├── LiveNxIREE.swift │ │ ├── NxAddon.swift │ │ ├── NxAddon │ │ ├── CameraCaptureView.swift │ │ ├── ImageView.swift │ │ ├── NxCameraFunctionView.swift │ │ └── NxFunctionView.swift │ │ ├── NxIREECppBridge.swift │ │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ │ ├── ReconnectingView.swift │ │ ├── c_src │ │ ├── nx_iree.cpp │ │ └── nx_iree.h │ │ └── nx_iree │ │ ├── include │ │ ├── iree │ │ │ ├── base │ │ │ │ ├── alignment.h │ │ │ │ ├── allocator.h │ │ │ │ ├── api.h │ │ │ │ ├── assert.h │ │ │ │ ├── attributes.h │ │ │ │ ├── bitfield.h │ │ │ │ ├── config.h │ │ │ │ ├── internal │ │ │ │ │ ├── arena.h │ │ │ │ │ ├── atomic_slist.h │ │ │ │ │ ├── atomics.h │ │ │ │ │ ├── atomics_clang.h │ │ │ │ │ ├── atomics_disabled.h │ │ │ │ │ ├── atomics_gcc.h │ │ │ │ │ ├── atomics_msvc.h │ │ │ │ │ ├── call_once.h │ │ │ │ │ ├── cpu.h │ │ │ │ │ ├── debugging.h │ │ │ │ │ ├── dynamic_library.h │ │ │ │ │ ├── event_pool.h │ │ │ │ │ ├── file_io.h │ │ │ │ │ ├── flags.h │ │ │ │ │ ├── flatcc │ │ │ │ │ │ ├── building.h │ │ │ │ │ │ ├── debugging.h │ │ │ │ │ │ └── parsing.h │ │ │ │ │ ├── fpu_state.h │ │ │ │ │ ├── inline_array.h │ │ │ │ │ ├── math.h │ │ │ │ │ ├── memory.h │ │ │ │ │ ├── path.h │ │ │ │ │ ├── prng.h │ │ │ │ │ ├── span.h │ │ │ │ │ ├── synchronization.h │ │ │ │ │ ├── threading.h │ │ │ │ │ ├── threading_impl.h │ │ │ │ │ ├── time.h │ │ │ │ │ ├── wait_handle.h │ │ │ │ │ ├── wait_handle_impl.h │ │ │ │ │ └── wait_handle_posix.h │ │ │ │ ├── loop.h │ │ │ │ ├── loop_emscripten.h │ │ │ │ ├── loop_inline.h │ │ │ │ ├── loop_sync.h │ │ │ │ ├── loop_test.h │ │ │ │ ├── status.h │ │ │ │ ├── status_cc.h │ │ │ │ ├── status_payload.h │ │ │ │ ├── string_builder.h │ │ │ │ ├── string_view.h │ │ │ │ ├── target_platform.h │ │ │ │ ├── time.h │ │ │ │ ├── tracing.h │ │ │ │ ├── tracing │ │ │ │ │ ├── console.h │ │ │ │ │ └── tracy.h │ │ │ │ └── wait_source.h │ │ │ ├── builtins │ │ │ │ ├── device │ │ │ │ │ └── device.h │ │ │ │ └── ukernel │ │ │ │ │ ├── api.h │ │ │ │ │ ├── arch │ │ │ │ │ ├── arm_64 │ │ │ │ │ │ ├── common_arm_64.h │ │ │ │ │ │ ├── mmt4d_arm_64_internal.h │ │ │ │ │ │ ├── pack_arm_64_internal.h │ │ │ │ │ │ └── unpack_arm_64_internal.h │ │ │ │ │ └── x86_64 │ │ │ │ │ │ ├── common_x86_64.h │ │ │ │ │ │ ├── mmt4d_x86_64_internal.h │ │ │ │ │ │ ├── pack_x86_64_internal.h │ │ │ │ │ │ └── unpack_x86_64_internal.h │ │ │ │ │ ├── common.h │ │ │ │ │ ├── exported_bits.h │ │ │ │ │ ├── mmt4d.h │ │ │ │ │ ├── mmt4d_internal.h │ │ │ │ │ ├── pack.h │ │ │ │ │ ├── pack_internal.h │ │ │ │ │ ├── query_tile_sizes.h │ │ │ │ │ ├── query_tile_sizes_internal.h │ │ │ │ │ ├── tools │ │ │ │ │ ├── benchmark.h │ │ │ │ │ ├── memcpy_benchmark.h │ │ │ │ │ ├── test.h │ │ │ │ │ └── util.h │ │ │ │ │ ├── unpack.h │ │ │ │ │ └── unpack_internal.h │ │ │ ├── hal │ │ │ │ ├── allocator.h │ │ │ │ ├── api.h │ │ │ │ ├── buffer.h │ │ │ │ ├── buffer_heap_impl.h │ │ │ │ ├── buffer_transfer.h │ │ │ │ ├── buffer_view.h │ │ │ │ ├── buffer_view_util.h │ │ │ │ ├── channel.h │ │ │ │ ├── channel_provider.h │ │ │ │ ├── command_buffer.h │ │ │ │ ├── command_buffer_validation.h │ │ │ │ ├── cts │ │ │ │ │ ├── allocator_test.h │ │ │ │ │ ├── buffer_mapping_test.h │ │ │ │ │ ├── command_buffer_copy_buffer_test.h │ │ │ │ │ ├── command_buffer_dispatch_test.h │ │ │ │ │ ├── command_buffer_fill_buffer_test.h │ │ │ │ │ ├── command_buffer_push_constants_test.h │ │ │ │ │ ├── command_buffer_test.h │ │ │ │ │ ├── command_buffer_update_buffer_test.h │ │ │ │ │ ├── cts_test_base.h │ │ │ │ │ ├── descriptor_set_layout_test.h │ │ │ │ │ ├── driver_test.h │ │ │ │ │ ├── event_test.h │ │ │ │ │ ├── executable_cache_test.h │ │ │ │ │ ├── file_test.h │ │ │ │ │ ├── pipeline_layout_test.h │ │ │ │ │ ├── semaphore_submission_test.h │ │ │ │ │ └── semaphore_test.h │ │ │ │ ├── detail.h │ │ │ │ ├── device.h │ │ │ │ ├── driver.h │ │ │ │ ├── driver_registry.h │ │ │ │ ├── drivers │ │ │ │ │ ├── cuda │ │ │ │ │ │ ├── api.h │ │ │ │ │ │ ├── cuda_allocator.h │ │ │ │ │ │ ├── cuda_buffer.h │ │ │ │ │ │ ├── cuda_device.h │ │ │ │ │ │ ├── cuda_dynamic_symbol_table.h │ │ │ │ │ │ ├── cuda_dynamic_symbols.h │ │ │ │ │ │ ├── cuda_headers.h │ │ │ │ │ │ ├── cuda_status_util.h │ │ │ │ │ │ ├── event_pool.h │ │ │ │ │ │ ├── event_semaphore.h │ │ │ │ │ │ ├── graph_command_buffer.h │ │ │ │ │ │ ├── memory_pools.h │ │ │ │ │ │ ├── native_executable.h │ │ │ │ │ │ ├── nccl_channel.h │ │ │ │ │ │ ├── nccl_dynamic_symbol_table.h │ │ │ │ │ │ ├── nccl_dynamic_symbols.h │ │ │ │ │ │ ├── nccl_headers.h │ │ │ │ │ │ ├── nccl_status_util.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ ├── pipeline_layout.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── stream_command_buffer.h │ │ │ │ │ │ ├── timepoint_pool.h │ │ │ │ │ │ └── tracing.h │ │ │ │ │ ├── hip │ │ │ │ │ │ ├── api.h │ │ │ │ │ │ ├── dynamic_symbol_tables.h │ │ │ │ │ │ ├── dynamic_symbols.h │ │ │ │ │ │ ├── event_pool.h │ │ │ │ │ │ ├── event_semaphore.h │ │ │ │ │ │ ├── graph_command_buffer.h │ │ │ │ │ │ ├── hip_allocator.h │ │ │ │ │ │ ├── hip_buffer.h │ │ │ │ │ │ ├── hip_device.h │ │ │ │ │ │ ├── hip_headers.h │ │ │ │ │ │ ├── memory_pools.h │ │ │ │ │ │ ├── native_executable.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ ├── pipeline_layout.h │ │ │ │ │ │ ├── rccl_channel.h │ │ │ │ │ │ ├── rccl_dynamic_symbol_table.h │ │ │ │ │ │ ├── rccl_dynamic_symbols.h │ │ │ │ │ │ ├── rccl_headers.h │ │ │ │ │ │ ├── rccl_status_util.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── status_util.h │ │ │ │ │ │ ├── stream_command_buffer.h │ │ │ │ │ │ ├── timepoint_pool.h │ │ │ │ │ │ └── tracing.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── local_sync │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── sync_device.h │ │ │ │ │ │ ├── sync_driver.h │ │ │ │ │ │ ├── sync_event.h │ │ │ │ │ │ └── sync_semaphore.h │ │ │ │ │ ├── local_task │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── task_command_buffer.h │ │ │ │ │ │ ├── task_device.h │ │ │ │ │ │ ├── task_driver.h │ │ │ │ │ │ ├── task_event.h │ │ │ │ │ │ ├── task_queue.h │ │ │ │ │ │ ├── task_queue_state.h │ │ │ │ │ │ └── task_semaphore.h │ │ │ │ │ ├── metal │ │ │ │ │ │ ├── api.h │ │ │ │ │ │ ├── builtin_executables.h │ │ │ │ │ │ ├── direct_allocator.h │ │ │ │ │ │ ├── direct_command_buffer.h │ │ │ │ │ │ ├── kernel_library.h │ │ │ │ │ │ ├── metal_buffer.h │ │ │ │ │ │ ├── metal_device.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ ├── pipeline_layout.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── shared_event.h │ │ │ │ │ │ └── staging_buffer.h │ │ │ │ │ └── vulkan │ │ │ │ │ │ ├── api.h │ │ │ │ │ │ ├── base_buffer.h │ │ │ │ │ │ ├── builtin_executables.h │ │ │ │ │ │ ├── command_queue.h │ │ │ │ │ │ ├── debug_reporter.h │ │ │ │ │ │ ├── descriptor_pool_cache.h │ │ │ │ │ │ ├── descriptor_set_arena.h │ │ │ │ │ │ ├── direct_command_buffer.h │ │ │ │ │ │ ├── direct_command_queue.h │ │ │ │ │ │ ├── dynamic_symbol_tables.h │ │ │ │ │ │ ├── dynamic_symbols.h │ │ │ │ │ │ ├── extensibility_util.h │ │ │ │ │ │ ├── handle_util.h │ │ │ │ │ │ ├── native_allocator.h │ │ │ │ │ │ ├── native_buffer.h │ │ │ │ │ │ ├── native_event.h │ │ │ │ │ │ ├── native_executable.h │ │ │ │ │ │ ├── native_pipeline_layout.h │ │ │ │ │ │ ├── native_semaphore.h │ │ │ │ │ │ ├── nop_executable_cache.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ └── driver_module.h │ │ │ │ │ │ ├── sparse_buffer.h │ │ │ │ │ │ ├── status_util.h │ │ │ │ │ │ ├── tracing.h │ │ │ │ │ │ ├── util │ │ │ │ │ │ ├── arena.h │ │ │ │ │ │ ├── intrusive_list.h │ │ │ │ │ │ └── ref_ptr.h │ │ │ │ │ │ ├── vulkan_device.h │ │ │ │ │ │ ├── vulkan_driver.h │ │ │ │ │ │ └── vulkan_headers.h │ │ │ │ ├── event.h │ │ │ │ ├── executable.h │ │ │ │ ├── executable_cache.h │ │ │ │ ├── fence.h │ │ │ │ ├── file.h │ │ │ │ ├── local │ │ │ │ │ ├── elf │ │ │ │ │ │ ├── arch.h │ │ │ │ │ │ ├── elf_module.h │ │ │ │ │ │ ├── elf_types.h │ │ │ │ │ │ ├── fatelf.h │ │ │ │ │ │ └── platform.h │ │ │ │ │ ├── executable_environment.h │ │ │ │ │ ├── executable_library.h │ │ │ │ │ ├── executable_library_demo.h │ │ │ │ │ ├── executable_library_util.h │ │ │ │ │ ├── executable_loader.h │ │ │ │ │ ├── executable_plugin.h │ │ │ │ │ ├── executable_plugin_manager.h │ │ │ │ │ ├── inline_command_buffer.h │ │ │ │ │ ├── loaders │ │ │ │ │ │ ├── embedded_elf_loader.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ │ └── init.h │ │ │ │ │ │ ├── static_library_loader.h │ │ │ │ │ │ ├── system_library_loader.h │ │ │ │ │ │ └── vmvx_module_loader.h │ │ │ │ │ ├── local_executable.h │ │ │ │ │ ├── local_executable_cache.h │ │ │ │ │ ├── local_pipeline_layout.h │ │ │ │ │ └── plugins │ │ │ │ │ │ ├── embedded_elf_plugin.h │ │ │ │ │ │ ├── registration │ │ │ │ │ │ └── init.h │ │ │ │ │ │ ├── static_plugin.h │ │ │ │ │ │ └── system_library_plugin.h │ │ │ │ ├── pipeline_layout.h │ │ │ │ ├── queue.h │ │ │ │ ├── resource.h │ │ │ │ ├── semaphore.h │ │ │ │ ├── string_util.h │ │ │ │ └── utils │ │ │ │ │ ├── allocators.h │ │ │ │ │ ├── caching_allocator.h │ │ │ │ │ ├── collective_batch.h │ │ │ │ │ ├── debug_allocator.h │ │ │ │ │ ├── deferred_command_buffer.h │ │ │ │ │ ├── deferred_work_queue.h │ │ │ │ │ ├── file_cache.h │ │ │ │ │ ├── file_transfer.h │ │ │ │ │ ├── libmpi.h │ │ │ │ │ ├── libmpi_dynamic_symbols.h │ │ │ │ │ ├── memory_file.h │ │ │ │ │ ├── mpi_channel_provider.h │ │ │ │ │ ├── resource_set.h │ │ │ │ │ └── semaphore_base.h │ │ │ ├── io │ │ │ │ ├── file_handle.h │ │ │ │ ├── formats │ │ │ │ │ ├── gguf │ │ │ │ │ │ └── gguf_parser.h │ │ │ │ │ ├── irpa │ │ │ │ │ │ ├── irpa_builder.h │ │ │ │ │ │ └── irpa_parser.h │ │ │ │ │ ├── parser_registry.h │ │ │ │ │ └── safetensors │ │ │ │ │ │ └── safetensors_parser.h │ │ │ │ ├── memory_stream.h │ │ │ │ ├── parameter_index.h │ │ │ │ ├── parameter_index_provider.h │ │ │ │ ├── parameter_provider.h │ │ │ │ ├── scope_map.h │ │ │ │ ├── stdio_stream.h │ │ │ │ ├── stream.h │ │ │ │ └── vec_stream.h │ │ │ ├── modules │ │ │ │ ├── check │ │ │ │ │ └── module.h │ │ │ │ ├── hal │ │ │ │ │ ├── inline │ │ │ │ │ │ └── module.h │ │ │ │ │ ├── loader │ │ │ │ │ │ └── module.h │ │ │ │ │ ├── module.h │ │ │ │ │ ├── types.h │ │ │ │ │ └── utils │ │ │ │ │ │ └── buffer_diagnostics.h │ │ │ │ ├── io │ │ │ │ │ └── parameters │ │ │ │ │ │ └── module.h │ │ │ │ └── vmvx │ │ │ │ │ ├── elementwise.h │ │ │ │ │ └── module.h │ │ │ ├── runtime │ │ │ │ ├── api.h │ │ │ │ ├── call.h │ │ │ │ ├── instance.h │ │ │ │ └── session.h │ │ │ ├── schemas │ │ │ │ ├── cpu_data.h │ │ │ │ ├── instruments │ │ │ │ │ └── dispatch.h │ │ │ │ └── parameter_archive.h │ │ │ ├── task │ │ │ │ ├── affinity_set.h │ │ │ │ ├── api.h │ │ │ │ ├── executor.h │ │ │ │ ├── executor_impl.h │ │ │ │ ├── list.h │ │ │ │ ├── poller.h │ │ │ │ ├── pool.h │ │ │ │ ├── post_batch.h │ │ │ │ ├── queue.h │ │ │ │ ├── scope.h │ │ │ │ ├── submission.h │ │ │ │ ├── task.h │ │ │ │ ├── task_impl.h │ │ │ │ ├── testing │ │ │ │ │ ├── task_test.h │ │ │ │ │ └── test_util.h │ │ │ │ ├── topology.h │ │ │ │ ├── tuning.h │ │ │ │ └── worker.h │ │ │ ├── testing │ │ │ │ ├── benchmark.h │ │ │ │ ├── gtest.h │ │ │ │ └── status_matchers.h │ │ │ ├── tooling │ │ │ │ ├── buffer_view_matchers.h │ │ │ │ ├── comparison.h │ │ │ │ ├── context_util.h │ │ │ │ ├── device_util.h │ │ │ │ ├── function_io.h │ │ │ │ ├── function_util.h │ │ │ │ ├── instrument_util.h │ │ │ │ ├── modules │ │ │ │ │ └── resolver.h │ │ │ │ ├── numpy_io.h │ │ │ │ ├── parameter_util.h │ │ │ │ └── run_module.h │ │ │ └── vm │ │ │ │ ├── api.h │ │ │ │ ├── buffer.h │ │ │ │ ├── bytecode │ │ │ │ ├── archive.h │ │ │ │ ├── disassembler.h │ │ │ │ ├── dispatch_util.h │ │ │ │ ├── module.h │ │ │ │ ├── module_impl.h │ │ │ │ ├── utils │ │ │ │ │ ├── block_list.h │ │ │ │ │ ├── features.h │ │ │ │ │ ├── generated │ │ │ │ │ │ └── op_table.h │ │ │ │ │ └── isa.h │ │ │ │ └── verifier.h │ │ │ │ ├── context.h │ │ │ │ ├── dynamic │ │ │ │ ├── api.h │ │ │ │ └── module.h │ │ │ │ ├── instance.h │ │ │ │ ├── invocation.h │ │ │ │ ├── list.h │ │ │ │ ├── module.h │ │ │ │ ├── native_module.h │ │ │ │ ├── native_module_cc.h │ │ │ │ ├── native_module_packing.h │ │ │ │ ├── native_module_test.h │ │ │ │ ├── ops.h │ │ │ │ ├── ops_emitc.h │ │ │ │ ├── ref.h │ │ │ │ ├── ref_cc.h │ │ │ │ ├── shims.h │ │ │ │ ├── shims_emitc.h │ │ │ │ ├── stack.h │ │ │ │ ├── type_def.h │ │ │ │ ├── value.h │ │ │ │ └── variant.h │ │ └── nx_iree │ │ │ └── runtime.h │ │ └── lib │ │ ├── host │ │ └── libnx_iree_runtime.so │ │ ├── ios │ │ └── libnx_iree_runtime.so │ │ ├── ios_simulator │ │ └── libnx_iree_runtime.so │ │ ├── tvos │ │ └── libnx_iree_runtime.so │ │ ├── tvos_simulator │ │ └── libnx_iree_runtime.so │ │ ├── visionos │ │ └── libnx_iree_runtime.so │ │ └── visionos_simulator │ │ └── libnx_iree_runtime.so │ ├── priv │ ├── gettext │ │ ├── en │ │ │ └── LC_MESSAGES │ │ │ │ └── errors.po │ │ └── errors.pot │ ├── repo │ │ ├── migrations │ │ │ └── .formatter.exs │ │ └── seeds.exs │ └── static │ │ ├── favicon.ico │ │ ├── images │ │ └── logo.svg │ │ └── robots.txt │ └── test │ ├── live_nx_iree_web │ ├── controllers │ │ ├── error_html_test.exs │ │ ├── error_json_test.exs │ │ └── page_controller_test.exs │ └── live │ │ ├── context_live_test.exs │ │ └── home_live_test.exs │ ├── support │ ├── conn_case.ex │ └── data_case.ex │ └── test_helper.exs ├── lib ├── mix │ └── tasks │ │ └── nx_iree │ │ └── native_download.ex ├── nx_iree.ex └── nx_iree │ ├── application.ex │ ├── backend.ex │ ├── compiler.ex │ ├── compiler │ └── graph_splitter.ex │ ├── device.ex │ ├── mix_helpers.exs │ ├── module.ex │ ├── native.ex │ └── vm.ex ├── mix.exs ├── mix.lock ├── priv └── VERSION ├── run.exs ├── scripts ├── build_and_package.sh ├── build_linux.sh ├── build_mac_arm.sh └── clone_iree.sh └── test ├── nx_iree ├── native_test.exs └── nx_test.exs └── test_helper.exs /.formatter.exs: -------------------------------------------------------------------------------- 1 | # Used by "mix format" 2 | [ 3 | inputs: ["{mix,.formatter}.exs", "{liveview_native,config,lib,test}/**/*.{ex,exs}"] 4 | ] 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # The directory Mix will write compiled artifacts to. 2 | /_build/ 3 | 4 | # If you run "mix test --cover", coverage assets end up here. 5 | /cover/ 6 | 7 | # The directory Mix downloads your dependencies sources to. 8 | /deps/ 9 | 10 | # Where third-party dependencies like ExDoc output generated docs. 11 | /doc/ 12 | 13 | # Ignore .fetch files in case you like to edit your project deps locally. 14 | /.fetch 15 | 16 | # If the VM crashes, it generates a dump, let's ignore it too. 17 | erl_crash.dump 18 | 19 | # Also ignore archive artifacts (built via "mix archive.build"). 20 | *.ez 21 | 22 | # Ignore package tarball (built via "mix hex.build"). 23 | nx_iree-*.tar 24 | 25 | # Temporary files, for example, from tests. 26 | /tmp/ 27 | 28 | /iree-runtime/ 29 | /cache/ 30 | 31 | /priv/iree-compile 32 | /priv/iree-runtime 33 | /priv/libnx_iree.so 34 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | elixir 1.17.0-otp-26 2 | erlang 26.0.2 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NxIREE 2 | 3 | Companion library to [EXLA](https://github.com/elixir-nx/exla), providing bindings for the [IREE](https://iree.dev) runtime for MLIR. 4 | 5 | MLIR modules can be obtained from Nx functions by calling `EXLA.to_mlir_module/2` on them. 6 | 7 | ## Installation 8 | 9 | If [available in Hex](https://hex.pm/docs/publish), the package can be installed 10 | by adding `nx_iree` to your list of dependencies in `mix.exs`: 11 | 12 | ```elixir 13 | def deps do 14 | [ 15 | {:nx_iree, "~> 0.1.0"} 16 | ] 17 | end 18 | ``` 19 | 20 | Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) 21 | and published on [HexDocs](https://hexdocs.pm). Once published, the docs can 22 | be found at . 23 | 24 | -------------------------------------------------------------------------------- /axon.exs: -------------------------------------------------------------------------------- 1 | Mix.install([ 2 | {:axon, github: "elixir-nx/axon", branch: "main"}, 3 | {:nx_iree, path: "."}, 4 | {:nx, github: "elixir-nx/nx", sparse: "nx", override: true}, 5 | {:exla, github: "elixir-nx/nx", sparse: "exla", override: true} 6 | ], system_env: %{"NX_IREE_PREFER_PRECOMPILED" => false}) 7 | 8 | {:ok, drivers} = NxIREE.list_drivers() |> IO.inspect(label: "drivers") 9 | 10 | {:ok, [dev | _]} = NxIREE.list_devices("cuda") 11 | 12 | flags = ["--iree-hal-target-backends=cuda", "--iree-input-type=stablehlo_xla", "--iree-execution-model=async-internal"] 13 | Nx.Defn.default_options(compiler: NxIREE.Compiler, iree_compiler_flags: flags, iree_runtime_options: [device: dev]) 14 | 15 | model = 16 | Axon.input("x", shape: {nil, 3}) 17 | |> Axon.dense(8, activation: :relu) 18 | |> Axon.dense(1, activation: :relu) 19 | 20 | Nx.Defn.default_options(compiler: NxIREE.Compiler, iree_compiler_flags: flags, iree_runtime_options: [device: dev]) 21 | # Nx.Defn.default_options(compiler: EXLA, iree_compiler_flags: flags, iree_runtime_options: [device: dev]) 22 | 23 | template = %{"x" => Nx.template({10, 3}, :f32)} 24 | 25 | {init_fn, predict_fn} = Axon.build(model, []) 26 | init_params = Nx.Defn.jit_apply(init_fn, [template, Axon.ModelState.new(Axon.ModelState.empty())]) 27 | 28 | IO.puts("\n\n\n======= BEGIN predict_compiled_fn =======\n\n\n") 29 | predict_compiled_fn = Nx.Defn.compile(predict_fn, [init_params, template]) 30 | IO.puts("\n\n\n======= END predict_compiled_fn =======\n\n\n") 31 | 32 | IO.puts("\n\n\n======= BEGIN predict_compiled_fn CALL =======\n\n\n") 33 | predict_compiled_fn.(init_params, Nx.iota({10, 3}, type: :f32)) |> dbg() 34 | IO.puts("\n\n\n======= END predict_compiled_fn CALL =======\n\n\n") 35 | -------------------------------------------------------------------------------- /cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12 FATAL_ERROR) 2 | 3 | set(_NAME nx_iree_runtime) 4 | 5 | project(${_NAME} VERSION 1.0 LANGUAGES CXX C) 6 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 7 | include(CheckCCompilerFlag) 8 | 9 | set(CMAKE_CXX_STANDARD 17) 10 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 11 | set(CMAKE_CXX_EXTENSIONS OFF) 12 | 13 | set(IREE_INPUT_STABLEHLO ON) 14 | set(IREE_BUILD_TESTS OFF) 15 | set(IREE_BUILD_SAMPLES OFF) 16 | 17 | if(CMAKE_BUILD_TYPE MATCHES MinSizeRel) 18 | set(IREE_SIZE_OPTIMIZED ON) 19 | endif() 20 | 21 | file(GLOB iree_runtime_sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc" "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h") 22 | 23 | if("$ENV{IREE_BUILD_TARGET}" STREQUAL "webassembly") 24 | add_subdirectory(modules/emscripten) 25 | else() 26 | add_subdirectory(modules/default) 27 | endif() 28 | 29 | set_target_properties(${_NAME} PROPERTIES 30 | INSTALL_RPATH_USE_LINK_PATH TRUE 31 | BUILD_WITH_INSTALL_RPATH TRUE 32 | ) 33 | 34 | set(__BUILD_DIR "${IREE_RUNTIME_BUILD_DIR}") 35 | 36 | add_subdirectory("${NX_IREE_SOURCE_DIR}" ${__BUILD_DIR} EXCLUDE_FROM_ALL) 37 | 38 | # Ensure visibility of all symbols 39 | set(CMAKE_CXX_VISIBILITY_PRESET default) 40 | set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF) 41 | 42 | target_compile_options(${_NAME} PUBLIC ${IREE_DEFAULT_COPTS}) 43 | 44 | add_definitions(-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1) -------------------------------------------------------------------------------- /cmake/modules/default/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(IREE_HAL_DRIVER_DEFAULTS ON) 2 | set(IREE_HAL_DRIVER_LOCAL_SYNC ON) 3 | set(IREE_HAL_EXECUTABLE_LOADER_DEFAULTS OFF) 4 | set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF ON) 5 | 6 | list(REMOVE_ITEM iree_runtime_sources 7 | "${CMAKE_SOURCE_DIR}/src/emscripten_api.cc" 8 | "${CMAKE_SOURCE_DIR}/src/emscripten_api.h" 9 | ) 10 | 11 | add_library(${_NAME} SHARED ${iree_runtime_sources}) 12 | 13 | set_target_properties(${_NAME} PROPERTIES 14 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" 15 | ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" 16 | SUFFIX ".so" 17 | ) 18 | 19 | install( 20 | TARGETS ${_NAME} 21 | DESTINATION "." 22 | ) 23 | 24 | target_link_libraries(${_NAME} iree_runtime_runtime) 25 | target_link_libraries(${_NAME} iree_tooling_context_util) 26 | 27 | # Install the header files - this will make it easier to copy them over 28 | # to the final bundle. 29 | install(DIRECTORY "${IREE_RUNTIME_INCLUDE_PATH}" 30 | DESTINATION "include" 31 | FILES_MATCHING PATTERN "*.h") 32 | 33 | file(GLOB HEADER_FILES "${CMAKE_SOURCE_DIR}/src/*.h") 34 | 35 | install(FILES ${HEADER_FILES} 36 | DESTINATION "include/nx_iree") 37 | 38 | if(APPLE) 39 | # Although the compiler complains about not using these, 40 | # things only work with them set 41 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup -fvisibility=default") 42 | set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-export_dynamic") 43 | check_c_compiler_flag("-arch arm64" ARM64_SUPPORTED) 44 | if(ARM64_SUPPORTED) 45 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_ARM64") 46 | endif() 47 | else() 48 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -shared -fvisibility=default") 49 | set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-dynamic") 50 | endif() -------------------------------------------------------------------------------- /compiler.exs: -------------------------------------------------------------------------------- 1 | NxIREE.list_drivers() |> IO.inspect(label: "drivers") 2 | 3 | {:ok, [dev | _]} = NxIREE.list_devices("metal") |> IO.inspect() 4 | 5 | fun = fn a, b -> 6 | key = Nx.Random.key(42) 7 | {val, _key} = Nx.Random.uniform(key, 0.0, 1.0) 8 | 9 | x = Nx.cos(a) |> Nx.add(Nx.sin(b)) 10 | {x, val, Nx.add(x, val)} 11 | end 12 | 13 | args = [Nx.template({4}, :f32), Nx.template({4}, :s64)] 14 | # args = [] 15 | flags = ["--iree-hal-target-backends=metal-spirv", "--iree-input-type=stablehlo_xla", "--iree-execution-model=async-internal"] 16 | 17 | Nx.Defn.default_options(compiler: NxIREE.Compiler, iree_compiler_flags: flags, iree_runtime_options: [device: dev]) 18 | 19 | f = Nx.Defn.compile(fun, args) 20 | 21 | Nx.default_backend(NxIREE.Backend) 22 | arg0 = Nx.tensor([1.0, 2.0, 3.0, 4.0]) 23 | arg1 = Nx.tensor([1, -1, 1, -1]) 24 | f.(arg0, arg1) |> dbg() 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/.formatter.exs: -------------------------------------------------------------------------------- 1 | [ 2 | import_deps: [:ecto, :ecto_sql, :phoenix], 3 | subdirectories: ["priv/*/migrations"], 4 | plugins: [Phoenix.LiveView.HTMLFormatter], 5 | inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"] 6 | ] 7 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/.gitignore: -------------------------------------------------------------------------------- 1 | # The directory Mix will write compiled artifacts to. 2 | /_build/ 3 | 4 | # If you run "mix test --cover", coverage assets end up here. 5 | /cover/ 6 | 7 | # The directory Mix downloads your dependencies sources to. 8 | /deps/ 9 | 10 | # Where 3rd-party dependencies like ExDoc output generated docs. 11 | /doc/ 12 | 13 | # Ignore .fetch files in case you like to edit your project deps locally. 14 | /.fetch 15 | 16 | # If the VM crashes, it generates a dump, let's ignore it too. 17 | erl_crash.dump 18 | 19 | # Also ignore archive artifacts (built via "mix archive.build"). 20 | *.ez 21 | 22 | # Temporary files, for example, from tests. 23 | /tmp/ 24 | 25 | # Ignore package tarball (built via "mix hex.build"). 26 | live_nx_iree-*.tar 27 | 28 | # Ignore assets that are produced by build tools. 29 | /priv/static/assets/ 30 | 31 | # Ignore digested assets cache. 32 | /priv/static/cache_manifest.json 33 | 34 | # In case you use Node.js/npm, you want to ignore these. 35 | npm-debug.log 36 | /assets/node_modules/ 37 | 38 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/README.md: -------------------------------------------------------------------------------- 1 | # LiveNxIREE 2 | 3 | To start your Phoenix server: 4 | 5 | * Run `mix setup` to install and setup dependencies 6 | * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` 7 | 8 | Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. 9 | 10 | Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html). 11 | 12 | ## Learn more 13 | 14 | * Official website: https://www.phoenixframework.org/ 15 | * Guides: https://hexdocs.pm/phoenix/overview.html 16 | * Docs: https://hexdocs.pm/phoenix 17 | * Forum: https://elixirforum.com/c/phoenix-forum 18 | * Source: https://github.com/phoenixframework/phoenix 19 | -------------------------------------------------------------------------------- /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/assets/js/app.js: -------------------------------------------------------------------------------- 1 | // If you want to use Phoenix channels, run `mix help phx.gen.channel` 2 | // to get started and then uncomment the line below. 3 | // import "./user_socket.js" 4 | 5 | // You can include dependencies in two ways. 6 | // 7 | // The simplest option is to put them in assets/vendor and 8 | // import them using relative paths: 9 | // 10 | // import "../vendor/some-package.js" 11 | // 12 | // Alternatively, you can `npm install some-package --prefix assets` and import 13 | // them using a path starting with the package name: 14 | // 15 | // import "some-package" 16 | // 17 | 18 | // Include phoenix_html to handle method=PUT/DELETE in forms and buttons. 19 | import "phoenix_html" 20 | // Establish Phoenix Socket and LiveView configuration. 21 | import {Socket} from "phoenix" 22 | import {LiveSocket} from "phoenix_live_view" 23 | import topbar from "../vendor/topbar" 24 | 25 | let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content") 26 | let liveSocket = new LiveSocket("/live", Socket, { 27 | longPollFallbackMs: 2500, 28 | params: {_csrf_token: csrfToken} 29 | }) 30 | 31 | // Show progress bar on live navigation and form submits 32 | topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"}) 33 | window.addEventListener("phx:page-loading-start", _info => topbar.show(300)) 34 | window.addEventListener("phx:page-loading-stop", _info => topbar.hide()) 35 | 36 | // connect if there are any LiveViews on the page 37 | liveSocket.connect() 38 | 39 | // expose liveSocket on window for web console debug logs and latency simulation: 40 | // >> liveSocket.enableDebug() 41 | // >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session 42 | // >> liveSocket.disableLatencySim() 43 | window.liveSocket = liveSocket 44 | 45 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/config/prod.exs: -------------------------------------------------------------------------------- 1 | import Config 2 | 3 | # Note we also include the path to a cache manifest 4 | # containing the digested version of static files. This 5 | # manifest is generated by the `mix assets.deploy` task, 6 | # which you should run after static files are built and 7 | # before starting your production server. 8 | config :live_nx_iree, LiveNxIREEWeb.Endpoint, 9 | cache_static_manifest: "priv/static/cache_manifest.json" 10 | 11 | # Configures Swoosh API Client 12 | config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: LiveNxIREE.Finch 13 | 14 | # Disable Swoosh Local Memory Storage 15 | config :swoosh, local: false 16 | 17 | # Do not print debug messages in production 18 | config :logger, level: :info 19 | 20 | # Runtime production configuration, including reading 21 | # of environment variables, is done on config/runtime.exs. 22 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/config/test.exs: -------------------------------------------------------------------------------- 1 | import Config 2 | 3 | # Configure your database 4 | # 5 | # The MIX_TEST_PARTITION environment variable can be used 6 | # to provide built-in test partitioning in CI environment. 7 | # Run `mix help test` for more information. 8 | config :live_nx_iree, LiveNxIREE.Repo, 9 | username: "postgres", 10 | password: "postgres", 11 | hostname: "localhost", 12 | database: "live_nx_iree_test#{System.get_env("MIX_TEST_PARTITION")}", 13 | pool: Ecto.Adapters.SQL.Sandbox, 14 | pool_size: System.schedulers_online() * 2 15 | 16 | # We don't run a server during test. If one is required, 17 | # you can enable the server option below. 18 | config :live_nx_iree, LiveNxIREEWeb.Endpoint, 19 | http: [ip: {127, 0, 0, 1}, port: 4002], 20 | secret_key_base: "7v8vwAFxEaV+KHGWD/AR2PEuzsLB4DNnZE3Z7k5uS9BE9QkU/gcHgUKQssSurNI7", 21 | server: false 22 | 23 | # In test we don't send emails 24 | config :live_nx_iree, LiveNxIREE.Mailer, adapter: Swoosh.Adapters.Test 25 | 26 | # Disable swoosh api client as it is only required for production adapters 27 | config :swoosh, :api_client, false 28 | 29 | # Print only warnings and errors during test 30 | config :logger, level: :warning 31 | 32 | # Initialize plugs at runtime for faster test compilation 33 | config :phoenix, :plug_init_mode, :runtime 34 | 35 | # Enable helpful, but potentially expensive runtime checks 36 | config :phoenix_live_view, 37 | enable_expensive_runtime_checks: true 38 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/install_nx_iree.sh: -------------------------------------------------------------------------------- 1 | 2 | mv native/swiftui/LiveNxIREE/nx_iree native/swiftui/LiveNxIREE/nx_iree_old 3 | 4 | for platform in host ios ios_simulator tvos tvos_simulator visionos visionos_simulator; do 5 | mix nx_iree.native_download --platform $platform --output-dir native/swiftui/LiveNxIREE/nx_iree/lib/$platform 6 | 7 | if [ $platform == "host" ]; then 8 | mv native/swiftui/LiveNxIREE/nx_iree/lib/host/include native/swiftui/LiveNxIREE/nx_iree/ 9 | else 10 | rm -rf native/swiftui/LiveNxIREE/nx_iree/lib/$platform/include 11 | fi 12 | 13 | rm native/swiftui/LiveNxIREE/nx_iree/lib/$platform/nx_iree-embedded-macos-$platform.tar.gz 14 | done 15 | 16 | rm -rf native/swiftui/LiveNxIREE/nx_iree_old 17 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREE do 2 | @moduledoc """ 3 | LiveNxIREE keeps the contexts that define your domain 4 | and business logic. 5 | 6 | Contexts are also responsible for managing your data, regardless 7 | if it comes from the database, an external API or others. 8 | """ 9 | end 10 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree/application.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREE.Application do 2 | # See https://hexdocs.pm/elixir/Application.html 3 | # for more information on OTP Applications 4 | @moduledoc false 5 | 6 | use Application 7 | 8 | @impl true 9 | def start(_type, _args) do 10 | children = [ 11 | LiveNxIREEWeb.Telemetry, 12 | # LiveNxIREE.Repo, 13 | {DNSCluster, query: Application.get_env(:live_nx_iree, :dns_cluster_query) || :ignore}, 14 | {Phoenix.PubSub, name: LiveNxIREE.PubSub}, 15 | # Start the Finch HTTP client for sending emails 16 | {Finch, name: LiveNxIREE.Finch}, 17 | # Start a worker by calling: LiveNxIREE.Worker.start_link(arg) 18 | # {LiveNxIREE.Worker, arg}, 19 | # Start to serve requests, typically the last entry 20 | LiveNxIREEWeb.Endpoint 21 | ] 22 | 23 | # See https://hexdocs.pm/elixir/Supervisor.html 24 | # for other strategies and supported options 25 | opts = [strategy: :one_for_one, name: LiveNxIREE.Supervisor] 26 | Supervisor.start_link(children, opts) 27 | end 28 | 29 | # Tell Phoenix to update the endpoint configuration 30 | # whenever the application is updated. 31 | @impl true 32 | def config_change(changed, _new, removed) do 33 | LiveNxIREEWeb.Endpoint.config_change(changed, removed) 34 | :ok 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /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/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/components/layouts.ex: -------------------------------------------------------------------------------- 1 | defmodule LiveNxIREEWeb.Layouts do 2 | @moduledoc """ 3 | This module holds different layouts used by your application. 4 | 5 | See the `layouts` directory for all templates available. 6 | The "root" layout is a skeleton rendered as part of the 7 | application router. The "app" layout is set as the default 8 | layout on both `use LiveNxIREEWeb, :controller` and 9 | `use LiveNxIREEWeb, :live_view`. 10 | """ 11 | use LiveNxIREEWeb, :html 12 | 13 | embed_templates "layouts/*" 14 | end 15 | -------------------------------------------------------------------------------- /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/app.html.heex: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 |

8 | v<%= Application.spec(:phoenix, :vsn) %> 9 |

10 |
11 | 25 |
26 |
27 |
28 |
29 | <.flash_group flash={@flash} /> 30 | <%= @inner_content %> 31 |
32 |
33 | -------------------------------------------------------------------------------- /embedded_devices/live_nx_iree/lib/live_nx_iree_web/components/layouts/root.html.heex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <.live_title suffix=" · Phoenix Framework"> 8 | <%= assigns[:page_title] || "LiveNxIREE" %> 9 | 10 | 11 | 13 | 14 | 15 | <%= @inner_content %> 16 | 17 | 18 | -------------------------------------------------------------------------------- /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/components/layouts_swiftui/root.swiftui.neex: -------------------------------------------------------------------------------- 1 | <.csrf_token /> 2 |