Loading...
Searching...
No Matches
EnvironmentKokkosAssembly.h File Reference

Species-environment covariance blocks assembled as Kokkos kernels. More...

#include <Eigen/Core>
#include <cstddef>
#include <memory>
#include "EnvironmentKernelWork.h"

Go to the source code of this file.

Classes

class  gpr::kokkos_environment::DeviceEnvironments
 Environment data of one configuration set, in execution memory. More...

Namespaces

namespace  gpr
 Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
namespace  gpr::kokkos_environment

Functions

DeviceEnvironments gpr::kokkos_environment::upload (const gpr::detail::EnvironmentBatchView &source)
 Copy the environments of source to execution memory.
std::size_t gpr::kokkos_environment::pairsPerChunk (const DeviceEnvironments &left_environments, const DeviceEnvironments &right_environments, int channel_count, std::size_t scratch_bytes)
Eigen::VectorXd gpr::kokkos_environment::assemble (const DeviceEnvironments &left_environments, const DeviceEnvironments &right_environments, const gpr::detail::EnvironmentPairBatch &batch, std::size_t scratch_bytes)

Variables

constexpr std::size_t gpr::kokkos_environment::default_scratch_bytes = std::size_t(256) << 20

Detailed Description

Species-environment covariance blocks assembled as Kokkos kernels.

The same flat work items the stdpar GPU executor runs (EnvironmentPairJets, EnvironmentWeightedJacobians, EnvironmentBlockEntries) run here on the Kokkos execution space, over environment data that lives in that space's memory. Every work item has one writer per output entry and a fixed summation order, so the blocks do not depend on how the tasks are scheduled. The Gram step contracts each left Jacobian with its weighted right Jacobian, one task per entry, with the feature sum in ascending order.

The blocks are downloaded chunk by chunk into one host vector, because the Kokkos backend takes host Eigen operands (KokkosWorkspace retains only the physical factor in execution memory). The Kokkos types stay out of this header; EnvironmentKokkosAssembly.cpp holds the kernels (EnvironmentKokkosAssembly.cu with CUDA).

Definition in file EnvironmentKokkosAssembly.h.