-
Notifications
You must be signed in to change notification settings - Fork 35
add an example for combination of Disjoint Pool and L0 #384
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
add an example for combination of Disjoint Pool and L0 #384
Conversation
b58285c
to
ab608f8
Compare
ba63cea
to
97a3d3d
Compare
97a3d3d
to
817e95d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please print all error messages to stderr(fprintf) also ensure that you include new line in it.
02103c0
to
721aab4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried to build this example on my side:
/usr/bin/ld: cannot find -lze_loader: No such file or directory collect2: error: ld returned 1 exit status
- this problem should be detected during configure step.
- example do not include any information about dependencies needed.
"Basic example requires UMF_BUILD_LIBUMF_POOL_SCALABLE and UMF_ENABLE_POOL_TRACKING | ||
to be turned ON - skipping") | ||
"GPU shared memory example requires " | ||
"UMF_BUILD_LEVEL_ZERO_PROVIDER and UMF_BUILD_LIBUMF_POOL_DISJOINT " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message is incorrect. Please fix it to include build GPU examples variable.
(BTW do we really need "UMF_BUILD_GPU_EXAMPLES" variable - imho if all dependencies are ON, we should build it by default)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second the question - do we need extra UMF_BUILD_GPU_EXAMPLES
option? We could enable testing this example if UMF_BUILD_GPU_TESTS
is ON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing (what we actually run) has nothing to do with the build options. UMF_BUILD_GPU_TESTS
is used for building, not testing. If you want to extend this flag, rename it UMF_BUILD_GPU_TESTS_AND_EXAMPLES
or UMG_BUILD_GPU_CODE
etc. I agree that we could do some cleanup in build flags - could we address this in additional PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm saying, is we could (as Łukasz stated above) build it all the time, as long as L0_PROVIDER is ON. We don't need this new flag just for building.
Nontheless, I guess, we could clean flags separately later on...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need a dedicated cmake option for GPU examples (UMF_BUILD_GPU_EXAMPLES). After the #427 is implemented we will have examples that will be installed with a pre-built version of UMF. So customer needs an option to disable/enable GPU examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this extra flag is not needed as when it is turned ON
but the two other flags are not, nothing happens. I think that existing flag UMF_BUILD_EXAMPLES
suffices. If the user wants to have examples build, then all examples for a given config options set will be built.
As it is now, the user would have to set both UMF_BUILD_EXAMPLES
and UMF_BUILD_GPU_EXAMPLES
flags to build this example. Seeing these two options in CMake I would expect that only the second one is needed for building the GPU examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that all changes around cmake files, flags and folders could be done as a part of #427
examples/basic/gpu_shared_memory.c
Outdated
|
||
// This function initializes the Level Zero driver and creates a context in the | ||
// first GPU device found. | ||
int level_zero_init(ze_driver_handle_t *driver, ze_device_handle_t *device, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In PR #418 I created some utility functions on top of the L0 API. We need to coordinate and decide how to re-use them among examples and tests where L0 provider is involved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vinser52 I used you file - please rebase after my changes have been added
721aab4
to
f8e27f8
Compare
cdfc7c5
to
909a17c
Compare
909a17c
to
ebb8ea1
Compare
"Basic example requires UMF_BUILD_LIBUMF_POOL_SCALABLE and UMF_ENABLE_POOL_TRACKING | ||
to be turned ON - skipping") | ||
"GPU shared memory example requires " | ||
"UMF_BUILD_LEVEL_ZERO_PROVIDER and UMF_BUILD_LIBUMF_POOL_DISJOINT " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second the question - do we need extra UMF_BUILD_GPU_EXAMPLES
option? We could enable testing this example if UMF_BUILD_GPU_TESTS
is ON.
17f0510
to
dbbf2b0
Compare
please re-review. Web documentation will be added in separate PR |
dbbf2b0
to
95b9692
Compare
95b9692
to
f092d2e
Compare
f092d2e
to
926678b
Compare
926678b
to
474fdc4
Compare
Description
Add an example for combination of Disjoint Pool and L0. NOTE: it would be currently build only on Linux and executed on systems with Level-Zero supported device
Checklist
TODO: web documentation will be created in separate PR