Skip to content

Commit

Permalink
Revert SPMD K-means instantiation to fix #2959 (#2986)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vika-F authored Nov 22, 2024
1 parent 08fd918 commit 1bef482
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
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

0 comments on commit 1bef482

Please sign in to comment.