Skip to content
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

Revert SPMD K-means instantiation to fix #2959 #2986

Merged
merged 1 commit into from
Nov 22, 2024
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
7 changes: 2 additions & 5 deletions cpp/oneapi/dal/algo/kmeans/detail/infer_ops_dpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ struct infer_ops_dispatcher<Policy, Float, Method, Task> {
template struct ONEDAL_EXPORT \
infer_ops_dispatcher<dal::detail::spmd_data_parallel_policy, F, M, T>;

#define INSTANTIATE_NON_DISTRIBUTED(F, M, T) \
template struct ONEDAL_EXPORT infer_ops_dispatcher<dal::detail::data_parallel_policy, F, M, T>;

INSTANTIATE(float, method::lloyd_dense, task::clustering)
INSTANTIATE(double, method::lloyd_dense, task::clustering)
INSTANTIATE_NON_DISTRIBUTED(float, method::lloyd_csr, task::clustering)
INSTANTIATE_NON_DISTRIBUTED(double, method::lloyd_csr, task::clustering)
INSTANTIATE(float, method::lloyd_csr, task::clustering)
INSTANTIATE(double, method::lloyd_csr, task::clustering)

} // namespace v1
} // namespace oneapi::dal::kmeans::detail
7 changes: 2 additions & 5 deletions cpp/oneapi/dal/algo/kmeans/detail/train_ops_dpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ struct train_ops_dispatcher<Policy, Float, Method, Task> {
template struct ONEDAL_EXPORT \
train_ops_dispatcher<dal::detail::spmd_data_parallel_policy, F, M, T>;

#define INSTANTIATE_NON_DISTRIBUTED(F, M, T) \
template struct ONEDAL_EXPORT train_ops_dispatcher<dal::detail::data_parallel_policy, F, M, T>;

INSTANTIATE(float, method::lloyd_dense, task::clustering)
INSTANTIATE(double, method::lloyd_dense, task::clustering)
INSTANTIATE_NON_DISTRIBUTED(float, method::lloyd_csr, task::clustering)
INSTANTIATE_NON_DISTRIBUTED(double, method::lloyd_csr, task::clustering)
INSTANTIATE(float, method::lloyd_csr, task::clustering)
INSTANTIATE(double, method::lloyd_csr, task::clustering)

} // namespace v1
} // namespace oneapi::dal::kmeans::detail
Loading