-
Notifications
You must be signed in to change notification settings - Fork 10
✨ Enabling Multi-Core Architectures #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
This is also related to #215 |
|
|
I moved the discussion from #227 to this PR to be able to combine it with actual additions to the code. Please, have a look and give feedback. Also feel free to ask any questions. @burgholzer @mnfarooqi @echavarria-lrz @AdVetter |
|
@echavarria-lrz please, tag further perople in case I forgot someone. |
|
|
Thank you @ystade for working on this and suggesting a solution. It took me a while to understand how things could work without an example implementation, but I think I get it now. The proposal seems reasonable to me. However, we would need to expand the specification documentation for clarity.
I cannot see this specified in the PR. However, there is no need for the specifications to entangle batch jobs and child devices. I am not sure why a job created on a child device cannot simply be submitted to that device, without the need for the parent device to submit it via a batch job. |
|
I am moving this to the 1.3.0 milestone for now as there still seems to be ongoing discussions that need to be resolved and the changes on |
@mnfarooqi To come back to your point, yes, that is indeed not specified in the PR, as I also do see other possibilities than the described one, a device could handle batch jobs. In the discussed case, you cannot execute individual jobs on the sub-devices; they do need to be pooled in one batch job in the parent device. However, there might be architectures where the former is actually possible in addition to the batch jobs. I see the batch job as a rather flexible way to pool multiple jobs, might even be jobs on the very same device that are submitted as one batch. P.S.: And yes, I agree, it is hard to grasp w/o an example. However, I think it does not makes sense to have an example for this very specific case in the QDMI repository. |
Description
This PR adds three properties and parameters to the interface to enable the following features of a multi-core architecture:
QDMI_DEVICE_PROPERTY_CHILDDEVICES. The client can retrieve all relevant information about the child devices via directly querying the respective properties of the child devices, such as its status, its fidelity data, ... To facilitate correct handling of the child device handle in the QDMI driver, a new session parameter,QDMI_DEVICE_SESSION_PARAMETER_CHILDDEVICEwas added.QDMI_PROGRAM_FORMAT_BATCHJOBwas added.Fixes #227, #141
Usage Example
Let's consider the following example that from the client's perspective
Note: The following exampe might not be syntactically correct.
sequenceDiagram participant Client participant Driver participant Device note right of Client: Retrieve device and child devices Client->>Driver: QDMI_session_alloc(&session) Client->>Driver: QDMI_session_init(session) Client->>Driver: QDMI_session_query_session_property(session, QDMI_SESSION_PROPERTY_DEVICES, ..., devices.data(), nullptr) Client->>Client: device = devices.front() Client->>Driver: QDMI_device_query_device_property(device, QDMI_DEVICE_PROPERTY_CHILDDEVICES, ..., clientChildDevices, nullptr) Driver->>Device: QDMI_device_session_query_device_property(device_session, QDMI_DEVICE_PROPERTY_CHILDDEVICES, ..., childDevices, nullptr) loop for (childDevice : childDevices) Driver->>Device: QDMI_device_session_alloc(&deviceSession) Driver->>Device: QDMI_device_session_set_parameter(deviceSession, QDMI_DEVICE_SESSION_PARAMETER_CHILDDEVICE, ..., childDevice) Driver->>Device: QDMI_device_session_init(deviceSession) Driver->>Driver: wrap the initialized device session into a QDMI_Device in the same way as for the device itself end Driver-->>Client: wrappedChildDevices note right of Client: Create and submit batch job loop for (childDevice: clientChildDevices) Client->>Driver: QDMI_device_create_job(childDevice, &clientChildJob) Driver->>Device: QDMI_device_session_create_device_job(childDevice->deviceSession, &childJob) Driver-->>Client: wrapped child job end Client->>Driver: QDMI_device_create_job(device, &clientJob) Driver->>Device: QDMI_device_session_create_device_job(device->deviceSession, &job) Driver-->>Client: wrapped (batch) job Client->>Driver: QDMI_job_set_parameter(clientJob, QDMI_JOB_PARAMETER_PROGRAMFORMAT, ..., QDMI_PROGRAM_FROMAT_BATCHJOB) Client->>Driver: QDMI_job_set_parameter(clientJob, QDMI_JOB_PARAMETER_PROGRAM, ..., &clientChildJobs) Client->>Driver: QDMI_job_submit(clientJob) Driver->>Device: QDMI_device_job_submit(clientJob->deviceJob)Checklist:
removals.