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
2 changes: 1 addition & 1 deletion plugin/sycl/common/linalg_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool Validate(DeviceOrd device, TensorView<T, D> t, Fn&& fn) {
namespace linalg {
template <typename T, int32_t D, typename Fn>
void ElementWiseKernel(Context const* ctx, TensorView<T, D> t, Fn&& fn) {
if (ctx->IsSycl()) {
if (t.Device().IsSycl()) {
sycl::linalg::ElementWiseKernel(t, fn);
} else {
ElementWiseKernelHost(t, ctx->Threads(), fn);
Expand Down
2 changes: 1 addition & 1 deletion src/objective/multiclass_obj.cu
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class SoftmaxMultiClassObj : public ObjFunction {
<< "Number of weights should be equal to number of data points.";
}
info.weights_.SetDevice(device);
auto weights = common::MakeOptionalWeights(this->ctx_->Device(), info.weights_);
auto weights = common::MakeOptionalWeights(device, info.weights_);

preds.SetDevice(device);
auto predt = linalg::MakeTensorView(this->ctx_, &preds, n_samples, n_classes);
Expand Down
Loading