Skip to content

Rename __jit to __proteus#424

Draft
davidbeckingsale wants to merge 3 commits intomainfrom
task/rename-interface
Draft

Rename __jit to __proteus#424
davidbeckingsale wants to merge 3 commits intomainfrom
task/rename-interface

Conversation

@davidbeckingsale
Copy link
Collaborator

Fixes #410

davidbeckingsale and others added 3 commits March 4, 2026 11:37
Implement the renamed entry points without changing ABI semantics.
This commit adds __proteus_* versions of all 13 public ABI symbols
plus the internal helper function, with signatures matching exactly:

Public ABI symbols:
- __proteus_entry (host JIT compilation entry point)
- __proteus_push_variable (push runtime constant to registry)
- __proteus_register_lambda (register lambda for JIT)
- __proteus_enable_host (enable host JIT)
- __proteus_disable_host (disable host JIT)
- __proteus_enable_device (enable device JIT)
- __proteus_disable_device (disable device JIT)
- __proteus_launch_kernel (device kernel launch interceptor)
- __proteus_register_var (register device variable)
- __proteus_register_fatbinary (register fatbinary)
- __proteus_register_fatbinary_end (end fatbinary registration)
- __proteus_register_linked_binary (register linked binary)
- __proteus_register_function (register device function)

Internal helper:
- __proteus_launch_kernel_internal (inline implementation)

All definitions maintain the same implementation behavior as their
__jit_* counterparts. The export map already contains the __proteus_*
wildcard pattern to export these symbols.

Files modified:
- include/proteus/JitInterface.h: Added __proteus_push_variable and
  __proteus_register_lambda declarations
- src/runtime/Init.cpp: Added __proteus_enable/disable_host/device
  declarations
- src/include/proteus/impl/CompilerInterfaceDevice.h: Added
  __proteus_launch_kernel declaration
- src/runtime/CompilerInterfaceHost.cpp: Added __proteus_entry,
  __proteus_push_variable, __proteus_register_lambda,
  __proteus_enable_host, __proteus_disable_host definitions
- src/runtime/CompilerInterfaceDevice.cpp: Added all device-side
  __proteus_* definitions
- src/include/proteus/impl/CompilerInterfaceDeviceInternal.h: Added
  __proteus_launch_kernel_internal inline function

This completes task proteus-5xl.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove __jit_* wildcard from exports.map to align with breaking-only
approach for the ABI rename from __jit_* to __proteus_*.

This change ensures that only __proteus_* symbols are exported from
the runtime shared library, completing the transition to the new
naming convention.

Changes:
- Remove __jit_* from global export section
- Keep __proteus_* to export all renamed ABI entry points
- No platform-specific export files needed (only exports.map exists)

Fixes: proteus-eqt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all references to the old __jit_* ABI names in code with the
new __proteus_* names. This includes:

- Direct calls to __jit_entry, __jit_push_variable, __jit_register_lambda
- Device runtime functions: __jit_register_var, __jit_register_fatbinary,
  __jit_register_fatbinary_end, __jit_register_linked_binary,
  __jit_register_function, __jit_launch_kernel
- Enable/disable functions: __jit_enable_host, __jit_disable_host,
  __jit_enable_device, __jit_disable_device
- Internal helper: __jit_launch_kernel_internal
- Generated symbol prefix: __jit_instance_*

Removed all old __jit_* declarations and definitions to complete the
breaking-only transition. All internal references now use __proteus_*.

Updated in:
- src/runtime/CompilerInterfaceHost.cpp
- src/runtime/CompilerInterfaceDevice.cpp
- src/runtime/Init.cpp
- src/runtime/JitEngineHost.cpp
- src/pass/ProteusPass.cpp
- include/proteus/JitInterface.h
- include/proteus/CppJitModule.h
- src/include/proteus/impl/CompilerInterfaceDevice.h
- src/include/proteus/impl/CompilerInterfaceDeviceInternal.h

This completes the ABI rename from __jit_* to __proteus_*.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ggeorgakoudis ggeorgakoudis marked this pull request as draft March 4, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename __jit interface functions to __proteus

1 participant