-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'update-connected-components' of https://github.com/tara…
…ng-jain/cuml into update-connected-components
- Loading branch information
Showing
63 changed files
with
788 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (c) 2023, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <cuda_runtime.h> | ||
#include <cuml/common/logger.hpp> | ||
#include <cuml/linear_model/qn.h> | ||
#include <raft/core/comms.hpp> | ||
|
||
#include <cumlprims/opg/matrix/data.hpp> | ||
#include <cumlprims/opg/matrix/part_descriptor.hpp> | ||
using namespace MLCommon; | ||
|
||
namespace ML { | ||
namespace GLM { | ||
namespace opg { | ||
|
||
/** | ||
* @brief performs MNMG fit operation for the logistic regression using quasi newton methods | ||
* @param[in] handle: the internal cuml handle object | ||
* @param[in] input_data: vector holding all partitions for that rank | ||
* @param[in] input_desc: PartDescriptor object for the input | ||
* @param[in] labels: labels data | ||
* @param[out] coef: learned coefficients | ||
* @param[in] pams: model parameters | ||
* @param[in] X_col_major: true if X is stored column-major | ||
* @param[in] n_classes: number of outputs (number of classes or `1` for regression) | ||
* @param[out] f: host pointer holding the final objective value | ||
* @param[out] num_iters: host pointer holding the actual number of iterations taken | ||
*/ | ||
void qnFit(raft::handle_t& handle, | ||
std::vector<Matrix::Data<float>*>& input_data, | ||
Matrix::PartDescriptor& input_desc, | ||
std::vector<Matrix::Data<float>*>& labels, | ||
float* coef, | ||
const qn_params& pams, | ||
bool X_col_major, | ||
int n_classes, | ||
float* f, | ||
int* num_iters); | ||
|
||
}; // namespace opg | ||
}; // namespace GLM | ||
}; // namespace ML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.