Comments (5)
@pvelesko, Sycl defers lz queue creation until any work gets submitted to the device hence "get_nativesycl::backend::level_zero();" is returning nullptr in samples/sycl_hip_interop. I modified the sample to add dummy task before query Native handle, what that I could see non-zero queue handle for "get_nativesycl::backend::level_zero();". Please take a look at the attached modified sample.
However this fix exposed a bug in the CHIP-SPV runtime teardown case for which I have raised a fix in PR#280
sycl_chip_interop.cpp.txt
from chipstar.
Closing it as "not a bug" feel free to re-open in case you feel it is otherwise.
from chipstar.
@Sarbojit2019 Queue handle is not being used.
void CHIPBackendLevel0::initializeFromNative(const uintptr_t *NativeHandles,
int NumHandles) {
logTrace("CHIPBackendLevel0 InitializeNative");
MinQueuePriority_ = ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH;
ze_driver_handle_t Drv = (ze_driver_handle_t)NativeHandles[0];
ze_device_handle_t Dev = (ze_device_handle_t)NativeHandles[1];
ze_context_handle_t Ctx = (ze_context_handle_t)NativeHandles[2];
CHIPContextLevel0 *ChipCtx = new CHIPContextLevel0(Drv, Ctx);
ChipCtx->setZeContextOwnership(false);
addContext(ChipCtx);
CHIPDeviceLevel0 *ChipDev = CHIPDeviceLevel0::create(Dev, ChipCtx, 0);
ChipCtx->setDevice(ChipDev);
LOCK(Backend->BackendMtx); // CHIPBackendLevel0::StaleEventMonitor
ChipDev->LegacyDefaultQueue = ChipDev->createQueue(NativeHandles, NumHandles);
StaleEventMonitor_ =
(CHIPStaleEventMonitorLevel0 *)Backend->createStaleEventMonitor_();
CallbackEventMonitor_ =
(CHIPCallbackEventMonitorLevel0 *)Backend->createCallbackEventMonitor_();
setActiveDevice(ChipDev);
}
from chipstar.
@pvelesko
CHIP-SPV does use native queue handle passed, check the below code.
CHIPQueue *CHIPDeviceLevel0::createQueue(const uintptr_t *NativeHandles,
int NumHandles) {
ze_command_queue_handle_t CmdQ = (ze_command_queue_handle_t)NativeHandles[3];
CHIPQueueLevel0 *NewQ;
if (!CmdQ) {
logWarn("initializeFromNative: native queue pointer is null. Creating a "
"new queue");
NewQ = new CHIPQueueLevel0(this, 0, 0);
} else {
NewQ = new CHIPQueueLevel0(this, CmdQ);
// In this case CHIP does not own the queue hence setting right ownership
if (NewQ != nullptr) {
NewQ->setCmdQueueOwnership(false);
}
}
return NewQ;
}
from chipstar.
oh my bad
from chipstar.
Related Issues (20)
- HeCBench: memtest benchmark crash
- Mali GPU: gets stuck at clFinish() in prepareDeviceVariables() HOT 2
- Intel CPU Runner OpenCL reporting 0 platforms HOT 6
- OpenCL dGPU CL_OUT_OF_RESOURES HOT 4
- HeCBench: matrixT-hip benchmark fails due to missing cooperative groups support HOT 1
- hipcc provides a broken clang++ command line HOT 5
- Need runtime interface to query if queue uses immediate command list. HOT 1
- CMake for linking in MKL for hip_sycl_interop and hip_sycl_interop_no_buffer examples HOT 1
- Missing "__atomic_fetch_add_8" support HOT 5
- fails to build with OCML_BASIC_ROUNDED_OPERATIONS=ON HOT 1
- atomicAdd for unsigned long lost HOT 2
- __bitinsert_u32() lost?
- fails to build when `/usr/bin/clang` doesn't exist HOT 1
- chipStar builds without linking to pthread (on some systems) then fails to run tests with "undefined reference to pthread_create"
- Results from Release-1.1 on Aurora with LLVM-16 built with gcc-12 and Intel UMD 736.25
- Bad portability due to Intel extensions in generated SPIR-V binaries
- chipStar tests may fail because of getHIPCCPath picking up wrong hipcc binary HOT 3
- Clang crashes during compilation HOT 10
- JIT Failures after updating to latest IGC HOT 5
- Wrong result for miniMDock HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chipstar.