@@ -65,7 +65,7 @@ struct ur_program_handle_t_ : _ur_object {
65
65
ze_module_constants_t ZeSpecConstants;
66
66
};
67
67
68
- // Construct a program in IL or Native state .
68
+ // Construct a program in IL.
69
69
ur_program_handle_t_ (state St, ur_context_handle_t Context, const void *Input,
70
70
size_t Length)
71
71
: Context{Context},
@@ -74,6 +74,15 @@ struct ur_program_handle_t_ : _ur_object {
74
74
std::memcpy (Code.get (), Input, Length);
75
75
}
76
76
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
+
77
86
// Construct a program in Exe or Invalid state.
78
87
ur_program_handle_t_ (state St, ur_context_handle_t Context,
79
88
ze_module_handle_t ZeModule,
@@ -108,6 +117,13 @@ struct ur_program_handle_t_ : _ur_object {
108
117
109
118
const ur_context_handle_t Context; // Context of the program.
110
119
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
+
111
127
// Indicates if we own the ZeModule or it came from interop that
112
128
// asked to not transfer the ownership to SYCL RT.
113
129
const bool OwnZeModule;
0 commit comments