NVIDIA / NVIDIA/cuvs

Long term improvements of OpenMP use in the context of SNMG ANN

Open
#1,559 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

OpenMP enables operations on different GPUs to run in parallel in the context of SNMG ANN. However, nested parallelism is not enabled by default impeding the underlying index construction from using per-GPU parallelism.

#1526 aimed at fixing this issue by :

  • Enabling nested parallelism with omp_set_nested(1)
  • Limiting outer loop to num_ranks threads (one per GPU)
  • Inside each rank thread, allocating threads_per_rank for internal parallelism
  • Restoring original thread count after parallel region

However other more elegant solutions might be considered in the future such as :

  • Using the concept of "teams" available in modern versions of OpenMP
  • Using environment variables to configure nested loops (like a comma separated OMP_NUM_THREADS environment variable with different number of threads for each loop in the nested hierarchy).
  • Other solutions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with issue #1526 and inspect the current SNMG ANN OpenMP implementation and its parallel regions. Compare the listed approaches for nested GPU and rank parallelism; done requires selecting a design and agreeing on an implementation plan, since this issue names no target files, tests, or single solution.

Written by the indexing model from the issue text.

Assessment

Domain
machine-learning, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.