-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Enable "alternative module loading" approach for Alpaka modules #40564
Conversation
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40564/33797
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
Instead of generating a cfi file for each Alpaka backend for each module
c131538
to
48ef682
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40564/33798
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages:
@cmsbuild, @smuzaffar, @Dr15Jones, @makortel, @fwyzard can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
enable gpu |
@cmsbuild, please test |
Personally I'd like something like process.foo = cms.PortableEDProducer("FooProducer", ... over process.foo = cms.EDProducer("FooProducer@alpaka", ... but it's just a matter of taste - I have not thought about any possible implications. |
Do you mean something like process.foo = cms.EDProducer("FooProducer@alpaka@serial_sync", ... ? But then isn't it simpler to just use the explicit module name, process.foo = cms.EDProducer("alpaka_serial_sync::TestAlpakaProducer", ... ? |
This change has one consequence that is worth of noting: users calling |
+heterogeneous |
+core |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
@cmsbuild, please test Probably better to refresh tests... |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-708a0f/30301/summary.html Comparison SummarySummary:
GPU Comparison SummarySummary:
|
+1 |
PR description:
This PR enables the "alternative module loading" functionality for Alpaka modules (following what I presented in https://indico.cern.ch/event/1208060/#16-portable-configuration-with). In order to use this mechanism, the configuration needs to load
HeterogeneousCore.AlpakaCore.ProcessAcceleratorAlpaka_cfi
, and define the modules in the configuration with@alpaka
postfix in the type name alongThe syntax works for EDProducers, EDAnalyzers, EDFilters, and ESProducers.
The backend can also be set explicitly via
The validity of the explicitly chosen backend is checked at the time the configuration is processed at the worker node, and value that is incompatible with the node hardware (or
process.options.accelerators
) leads to an exception being thrown. It follows that this approach of defining Alpaka modules with explicitly selected backend does not really work withSwitchProducer
(where all modules need to be constructed in the C++ side).An alternative design that was considered was to encode the backend selection information in the C++ type field (e.g. after
@alpaka
). Expressing it in the configuration parameters instead allows the backend selection to be easily customized after the module definition (e.g. with aModifier
), and allows the selection logic to be extended with little technical constraints in the future (e.g. selected modules could use TBB when running on CPU).The benefits of this model over
SwitchProducer
includeSCRAM_ARCH
s that don't support all accelerator backends (or anything beyond CPU)EDAnalyzer
,EDFilter
, andESProducer
in addition ofEDProducer
Potential discussion points
@alpaka
suffixcfi
file (and thus be visible for ConfDB parsing)cfi
files should be generated?cfi
file only forFooProducer@alpaka
. An alternative could be to generatecfi
files also forserial_sync::FooProducer
andcuda_async::FooProducer
for some amount of time.HeterogeneousCore.AlpakaCore.ProcessAcceleratorAlpaka_cfi
toConfiguration.StandardSequences.Accelerators_cff
PR validation:
Unit tests run.