MLIR-AIE
target.h
Go to the documentation of this file.
1//===- target.h ------------------------------------------------*- C++ -*-===//
2//
3// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7// (c) Copyright 2023 Advanced Micro Devices, Inc.
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef AIE_TARGET_H
12#define AIE_TARGET_H
13
14#include <list>
15#include <vector>
16#include <xaiengine.h>
17
18#ifdef HSA_RUNTIME
19#include "hsa/hsa.h"
20#include "hsa/hsa_ext_amd.h"
21#endif
22
25 uint64_t physicalAddr;
26 size_t size;
27 int fd; // The file descriptor used during allocation
28 XAie_MemInst MemInst; // LibXAIE handle if necessary. This should go away.
29};
30
32 XAie_Config AieConfigPtr;
33 XAie_DevInst DevInst;
34 // Some device memory allocators need this to keep track of VA->PA mappings
35 std::list<ext_mem_model_t> allocations;
36#ifdef HSA_RUNTIME
37 hsa_queue_t *cmd_queue;
38 std::vector<hsa_agent_t> agents;
39 hsa_amd_memory_pool_t global_mem_pool;
40#endif
41};
42
43#endif
XAie_DevInst DevInst
Definition target.h:33
XAie_Config AieConfigPtr
Definition target.h:32
std::list< ext_mem_model_t > allocations
Definition target.h:35
XAie_MemInst MemInst
Definition target.h:28
uint64_t physicalAddr
Definition target.h:25
size_t size
Definition target.h:26
void * virtualAddr
Definition target.h:24