File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
third_party/intel/backend Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,15 @@ static PyObject *loadBinary(PyObject *self, PyObject *args) {
137137 const size_t binary_size = PyBytes_Size (py_bytes );
138138
139139 uint8_t * binary_ptr = (uint8_t * )PyBytes_AsString (py_bytes );
140- const auto ctx = sycl_device .get_platform ().ext_oneapi_get_default_context ();
140+ auto platform = sycl_device .get_platform ();
141+ sycl ::context ctx ;
142+ try {
143+ ctx = platform .ext_oneapi_get_default_context ();
144+ } catch (const std ::runtime_error & ex ) {
145+ #if _DEBUG
146+ std ::cout << "ERROR: " << ex .what () << std ::endl ;
147+ #endif
148+ }
141149 const auto l0_device =
142150 sycl ::get_native < sycl ::backend ::ext_oneapi_level_zero > (sycl_device );
143151 const auto l0_context =
You can’t perform that action at this time.
0 commit comments