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

Feature Alpaka-OpenMP backend #97

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

sbaldu
Copy link
Collaborator

@sbaldu sbaldu commented Feb 26, 2025

This PR adds the alpaka-based OpenMP backed for parallel execution on CPU, which serves as an alternative for the TBB backend.

@@ -26,6 +26,10 @@
if tbb_found:
import CLUE_CPU_TBB as cpu_tbb
backends.append("cpu tbb")
omp_found = exists(str(*glob(join(path, 'lib/CLUE_CPU_OMP*.so'))))
if omp_found:
import CLUE_CPU_OMP as cpu_omp

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'CLUE_CPU_OMP' (import-error) Warning

Unable to import 'CLUE_CPU_OMP' (import-error)
}
}

PYBIND11_MODULE(CLUE_CPU_OMP, m) {

Check warning

Code scanning / Cppcheck (reported by Codacy)

syntax error Warning

syntax error
@@ -26,6 +26,10 @@
if tbb_found:
import CLUE_CPU_TBB as cpu_tbb
backends.append("cpu tbb")
omp_found = exists(str(*glob(join(path, 'lib/CLUE_CPU_OMP*.so'))))

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "omp_found" doesn't conform to UPPER_CASE naming style Warning

Constant name "omp_found" doesn't conform to UPPER_CASE naming style
@@ -600,7 +619,7 @@
print("HIP module not found. Please re-compile the library and try again.")
else:
raise ValueError("Invalid backend. The allowed choices for the"
+ " backend are: all, cpu serial, cpu tbb and gpu cuda.")
+ " backend are: all, cpu serial, cpu tbb, cpu openmp, gpu cuda and gpu hip.")

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (107/100) Warning

Line too long (107/100)
@@ -26,6 +26,10 @@
if tbb_found:
import CLUE_CPU_TBB as cpu_tbb
backends.append("cpu tbb")
omp_found = exists(str(*glob(join(path, 'lib/CLUE_CPU_OMP*.so'))))

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Constant name "omp_found" doesn't conform to UPPER_CASE naming style Warning

Constant name "omp_found" doesn't conform to UPPER_CASE naming style
@@ -600,7 +619,7 @@
print("HIP module not found. Please re-compile the library and try again.")
else:
raise ValueError("Invalid backend. The allowed choices for the"
+ " backend are: all, cpu serial, cpu tbb and gpu cuda.")
+ " backend are: all, cpu serial, cpu tbb, cpu openmp, gpu cuda and gpu hip.")

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (107/100) Warning

Line too long (107/100)
@sbaldu sbaldu force-pushed the feature-openmp-backend branch from 5bc9000 to 397c460 Compare February 26, 2025 13:53
@sbaldu sbaldu force-pushed the feature-openmp-backend branch from cf7d924 to dcbac9f Compare February 26, 2025 18:12
@sbaldu sbaldu merged commit f2fd20d into cms-patatrack:main Feb 26, 2025
9 of 12 checks passed
@sbaldu sbaldu deleted the feature-openmp-backend branch February 26, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant