GpuBlackoilIntensiveQuantitiesDispatcher and FIBlackoilModel wiring#7030
Open
kjetilly wants to merge 5 commits into
Open
GpuBlackoilIntensiveQuantitiesDispatcher and FIBlackoilModel wiring#7030kjetilly wants to merge 5 commits into
kjetilly wants to merge 5 commits into
Conversation
Adds host-side allocator helpers, host/device-decorated raw-pointer accessors and small additions to MiniVector that the rest of the GPU intensive-quantities work depends on. Updates test_gpu_smart_pointers.cu to cover the new behaviour.
…) use Decorates inline helpers in blackoil*modules.hh, blackoilprimaryvariables.hh, directionalmobility.hh, tpfalinearizer.hh, NewTranFluxModule.hpp, TemperatureModel.hpp and BlackOilEnergyIntensiveQuantitiesGlobalIndex.hpp with OPM_HOST_DEVICE, replaces a few raw `throw`s with OPM_THROW, and switches static `FluidSystem::` accesses to instance-based `fluidState.fluidSystem()` / `getFluidSystem()` so the same code works when the fluid system lives on the device. Test test_gpu_linear_two_phase_material.cu picks up the matching template adjustments.
Adds the GPU intensive-quantities dispatcher
(GpuBlackoilIntensiveQuantitiesDispatcher.{hpp,cu}) and the supporting
GpuFlowGasWaterEnergyTypeTags.hpp. FIBlackoilModel is updated in this
branch (rather than earlier) to consume the dispatcher as the entry
point used to push BlackOilIntensiveQuantities updates to the device.
The .cu translation unit and the OPM_HAVE_GPU_BLACKOIL_INTENSIVE_QUANTITIES_DISPATCHER
macro are gated on HIP or CUDA >= 13.1.
Adds the GPU-side problem and material/thermal law manager headers (GpuFlowProblem, GpuEclMaterialLawManager, GpuEclThermalLawManager) plus the matching GPU element-context header (fvbaseelementcontextgpu.hh) and the FlowGasWaterEnergyTypeTag.hpp typetag. Wires them through FlowProblemParameters and adds a Boost test (test_gpu_ecl_thermal_law_manager.cu) backed by tests/very_simple_deck.DATA. The new test is gated on HIP or CUDA >= 13.1 in CMakeLists_files.cmake.
Reworks BlackOilIntensiveQuantities so its update path is fully usable from device code (relaxed-constexpr-friendly storage, host/device-decorated helpers, moved init helpers). Adds tests/gpuistl/test_blackoilintensivequantities_gpu.cu which exercises the GPU update path end-to-end and matches it against the CPU reference, including derivatives. The test is gated on HIP or CUDA >= 13.1.
3aa01ea to
d17e801
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needs OPM/opm-common#5138.
Adds the GPU intensive-quantities dispatcher (GpuBlackoilIntensiveQuantitiesDispatcher.{hpp,cu}) and the supporting GpuFlowGasWaterEnergyTypeTags.hpp. This adds the runtime keyword
--experimental-compute-properties-on-gpu={true,false}which enables running the property calculation on the GPU (provided the input case is a CO2STORE case)The .cu translation unit and the OPM_HAVE_GPU_BLACKOIL_INTENSIVE_QUANTITIES_DISPATCHER macro are gated on HIP or CUDA >= 13.1.