DPU Host API  2025.1.0
dpu_checkpoint.h
Go to the documentation of this file.
1 /* Copyright 2020 UPMEM. All rights reserved.
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 #ifndef DPU_CHECKPOINT_H
7 #define DPU_CHECKPOINT_H
8 
9 #include <dpu_error.h>
10 #include <dpu_types.h>
11 
21  DPU_CHECKPOINT_NONE = 0x0,
31 
36 #define DPU_CHECKPOINT_ALL (DPU_CHECKPOINT_INTERNAL | DPU_CHECKPOINT_IRAM | DPU_CHECKPOINT_MRAM | DPU_CHECKPOINT_WRAM)
37 
46 dpu_checkpoint_save(struct dpu_set_t set, dpu_checkpoint_flags_t flags, struct dpu_context_t *context);
47 
56 dpu_checkpoint_restore(struct dpu_set_t set, dpu_checkpoint_flags_t flags, struct dpu_context_t *context);
57 
63 uint32_t
65 
74 dpu_checkpoint_serialize(struct dpu_context_t *context, uint8_t **serialized_context, uint32_t *serialized_context_size);
75 
84 dpu_checkpoint_deserialize(const uint8_t *serialized_context, uint32_t serialized_context_size, struct dpu_context_t *context);
85 
92 dpu_checkpoint_free(struct dpu_context_t *context);
93 
94 #endif /* DPU_CHECKPOINT_H */
Base DPU types in the C API.
Definition: dpu_checkpoint.h:27
dpu_error_t dpu_checkpoint_free(struct dpu_context_t *context)
Free a DPU context allocated by dpu_checkpoint.
Definition: dpu_checkpoint.h:29
dpu_error_t dpu_checkpoint_serialize(struct dpu_context_t *context, uint8_t **serialized_context, uint32_t *serialized_context_size)
Serializes a DPU state.
Definition: dpu_checkpoint.h:23
dpu_error_t dpu_checkpoint_save(struct dpu_set_t set, dpu_checkpoint_flags_t flags, struct dpu_context_t *context)
Extracts the DPU state.
enum _dpu_checkpoint_flags_t dpu_checkpoint_flags_t
Options for a DPU checkpoint.
dpu_error_t dpu_checkpoint_restore(struct dpu_set_t set, dpu_checkpoint_flags_t flags, struct dpu_context_t *context)
Restores a DPU state.
Definition: dpu_checkpoint.h:25
A set of DPU devices.
Definition: dpu_types.h:241
dpu_error_t
Status returned by any API operation to specify the success or failure of the operation.
Definition: dpu_error.h:17
Define the possible status returned by the API functions.
dpu_error_t dpu_checkpoint_deserialize(const uint8_t *serialized_context, uint32_t serialized_context_size, struct dpu_context_t *context)
Deserializes a DPU state.
_dpu_checkpoint_flags_t
Options for a DPU checkpoint.
Definition: dpu_checkpoint.h:20
uint32_t dpu_checkpoint_get_serialized_context_size(struct dpu_context_t *context)
Computes the size of the context once serialized.
Debugging information.
Definition: dpu_types.h:368