blob: 663792398f86048bbbbee74c65e8167cd6819c4a [file] [log] [blame]
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef IREE_HAL_ROCM_CONTEXT_WRAPPER_H_
#define IREE_HAL_ROCM_CONTEXT_WRAPPER_H_
#include "experimental/rocm/dynamic_symbols.h"
#include "experimental/rocm/rocm_headers.h"
#include "iree/hal/api.h"
// Structure to wrap all objects constant within a context. This makes it
// simpler to pass it to the different objects and saves memory.
typedef struct {
hipCtx_t rocm_context;
iree_allocator_t host_allocator;
iree_hal_rocm_dynamic_symbols_t *syms;
} iree_hal_rocm_context_wrapper_t;
#endif // IREE_HAL_ROCM_CONTEXT_WRAPPER_H_