-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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 support inference on SYCL devices #9800
Add support inference on SYCL devices #9800
Conversation
- conda-forge | ||
- intel | ||
dependencies: | ||
- python=3.8 |
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.
should be it 3.8 or higher?
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.
Have used the same config, as is already used for cpu
Co-authored-by: Nikolay Petrov <[email protected]>
Co-authored-by: Nikolay Petrov <[email protected]>
@@ -262,7 +269,6 @@ struct Context : public XGBoostParameter<Context> { | |||
*/ | |||
template <typename CPUFn, typename CUDAFn, typename SYCLFn> | |||
decltype(auto) DispatchDevice(CPUFn&& cpu_fn, CUDAFn&& cuda_fn, SYCLFn&& sycl_fn) const { | |||
static_assert(std::is_same_v<std::invoke_result_t<CPUFn>, std::invoke_result_t<CUDAFn>>); |
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.
why?
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 case of non-sycl device, the DispatchDevice
with this assert will be called. So, it was just a duplicated assert.
#include "xgboost/context.h" | ||
|
||
namespace xgboost { | ||
namespace sycl { |
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.
Are you sure you want to use sycl
namespace in the first PR? In the future, you will have to keep doing ::sycl
for the global sycl namespace.
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.
Yes. This option is not perfect, but looks like the best one.
Co-authored-by: Alexandra <[email protected]>
Co-authored-by: Alexandra <[email protected]>
Co-authored-by: Alexandra <[email protected]>
Co-authored-by: Alexandra <[email protected]>
Co-authored-by: Alexandra <[email protected]>
Co-authored-by: Alexandra <[email protected]>
plugin/sycl/README.md
Outdated
``` | ||
|
||
## Dependencies | ||
To build the plugin, install [Intel® oneAPI DPC++/C++ Compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html). |
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 we also should mention that once build - for running plugin you have to resolve DPC compiler runtime + drivers
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.
done
Hi, could you please help take a look into the CI errors? |
working on it right now. Will fix it asap. |
no worries, we trigger AWS workers for the CI manually. It was just a friendly reminder that the CI has been triggered. |
|
In continuation of #9691
This PR adds experimental support of prediction with SYCL devices.
The key changes are:
sycl_predictor
, which is calling if SYCL device parameter is specified.PredictBatch
method has a native SYCL implementation.-DPLUGIN_SYCL=ON
forcmake.