@@ -65,7 +65,7 @@ struct ur_program_handle_t_ : _ur_object {
6565 ze_module_constants_t ZeSpecConstants;
6666 };
6767
68- // Construct a program in IL or Native state .
68+ // Construct a program in IL.
6969 ur_program_handle_t_ (state St, ur_context_handle_t Context, const void *Input,
7070 size_t Length)
7171 : Context{Context},
@@ -74,6 +74,15 @@ struct ur_program_handle_t_ : _ur_object {
7474 std::memcpy (Code.get (), Input, Length);
7575 }
7676
77+ // Construct a program in NATIVE.
78+ ur_program_handle_t_ (state St, ur_context_handle_t Context, ur_device_handle_t Device, const ur_program_properties_t *Properties, const void *Input,
79+ size_t Length)
80+ : Context{Context}, NativeDevice(Device), NativeProperties(Properties),
81+ OwnZeModule{true }, State{St}, Code{new uint8_t [Length]},
82+ CodeLength{Length}, ZeModule{nullptr }, ZeBuildLog{nullptr } {
83+ std::memcpy (Code.get (), Input, Length);
84+ }
85+
7786 // Construct a program in Exe or Invalid state.
7887 ur_program_handle_t_ (state St, ur_context_handle_t Context,
7988 ze_module_handle_t ZeModule,
@@ -108,6 +117,13 @@ struct ur_program_handle_t_ : _ur_object {
108117
109118 const ur_context_handle_t Context; // Context of the program.
110119
120+
121+ // Device Handle used for the Native Build
122+ ur_device_handle_t NativeDevice;
123+
124+ // Properties used for the Native Build
125+ const ur_program_properties_t *NativeProperties;
126+
111127 // Indicates if we own the ZeModule or it came from interop that
112128 // asked to not transfer the ownership to SYCL RT.
113129 const bool OwnZeModule;
0 commit comments