Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion plugin/sycl/context_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ namespace sycl {

DeviceOrd DeviceFP64(const DeviceOrd& device) {
DeviceManager device_manager;
bool support_fp64 = device_manager.GetQueue(device)->get_device().has(::sycl::aspect::fp64);
bool support_fp64 = true;
if (device.IsSycl()) {
support_fp64 = device_manager.GetQueue(device)->get_device().has(::sycl::aspect::fp64);
}

if (support_fp64) {
return device;
} else {
Expand Down
5 changes: 4 additions & 1 deletion src/objective/multiclass_obj.cu
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ class SoftmaxMultiClassObj : public ObjFunction {
auto weights = common::MakeOptionalWeights(device, info.weights_);

preds.SetDevice(device);
auto predt = linalg::MakeTensorView(this->ctx_, &preds, n_samples, n_classes);
Context cpu_context = Context();
auto predt = linalg::MakeTensorView(
device == ctx_->Device() ? this->ctx_ : &cpu_context,
&preds, n_samples, n_classes);
CHECK_EQ(labels.Shape(1), 1);
auto y1d = labels.Slice(linalg::All(), 0);
CHECK_EQ(y1d.Shape(0), info.num_row_);
Expand Down
Loading