[Breaking] Accept multi-dim meta info. (#7405)
This PR changes base_margin into a 3-dim array, with one of them being reserved for multi-target classification. Also, a breaking change is made for binary serialization due to extra dimension along with a fix for saving the feature weights. Lastly, it unifies the prediction initialization between CPU and GPU. After this PR, the meta info setter in Python will be based on array interface.
This commit is contained in:
@@ -12,7 +12,8 @@ int AllVisibleGPUs() {
|
||||
// When compiled with CUDA but running on CPU only device,
|
||||
// cudaGetDeviceCount will fail.
|
||||
dh::safe_cuda(cudaGetDeviceCount(&n_visgpus));
|
||||
} catch(const dmlc::Error &except) {
|
||||
} catch (const dmlc::Error &) {
|
||||
cudaGetLastError(); // reset error.
|
||||
return 0;
|
||||
}
|
||||
return n_visgpus;
|
||||
|
||||
Reference in New Issue
Block a user