Files
rocm-systems/rocclr/runtime/device/rocm/rockernel.hpp
T
foreman 7cb078bf63 P4 to Git Change 2061164 by gandryey@gera-win10 on 2020/01/21 18:19:35
SWDEV-197836 - Drop the use of llvm header files in opencl runtime
	- Remove llvm::AMDGPU::HSAMD::Kernel::Metadata usage

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#40 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#86 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#31 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#55 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#28 edit
2020-01-21 18:24:20 -05:00

71 wiersze
2.2 KiB
C++

//
// Copyright (c) 2009 Advanced Micro Devices, Inc. All rights reserved.
//
#pragma once
#include <memory>
#include "acl.h"
#include "rocprogram.hpp"
#include "top.hpp"
#include "rocprintf.hpp"
#ifndef WITHOUT_HSA_BACKEND
namespace roc {
#define MAX_INFO_STRING_LEN 0x40
class Kernel : public device::Kernel {
public:
Kernel(std::string name, Program* prog, const uint64_t& kernelCodeHandle,
const uint32_t workgroupGroupSegmentByteSize,
const uint32_t workitemPrivateSegmentByteSize, const uint32_t kernargSegmentByteSize,
const uint32_t kernargSegmentAlignment);
Kernel(std::string name, Program* prog);
~Kernel() {}
//! Initializes the metadata required for this kernel
virtual bool init() = 0;
const Program* program() const { return static_cast<const Program*>(&prog_); }
};
class HSAILKernel : public roc::Kernel {
public:
HSAILKernel(std::string name, Program* prog, const uint64_t& kernelCodeHandle,
const uint32_t workgroupGroupSegmentByteSize,
const uint32_t workitemPrivateSegmentByteSize,
const uint32_t kernargSegmentByteSize,
const uint32_t kernargSegmentAlignment)
: roc::Kernel(name, prog, kernelCodeHandle, workgroupGroupSegmentByteSize,
workitemPrivateSegmentByteSize, kernargSegmentByteSize, kernargSegmentAlignment) {
}
//! Initializes the metadata required for this kernel
virtual bool init() final;
};
class LightningKernel : public roc::Kernel {
public:
LightningKernel(std::string name, Program* prog, const uint64_t& kernelCodeHandle,
const uint32_t workgroupGroupSegmentByteSize,
const uint32_t workitemPrivateSegmentByteSize,
const uint32_t kernargSegmentByteSize,
const uint32_t kernargSegmentAlignment)
: roc::Kernel(name, prog, kernelCodeHandle, workgroupGroupSegmentByteSize,
workitemPrivateSegmentByteSize, kernargSegmentByteSize, kernargSegmentAlignment) {
}
LightningKernel(std::string name, Program* prog)
: roc::Kernel(name, prog) {}
//! Initializes the metadata required for this kernel
virtual bool init() final;
};
} // namespace roc
#endif // WITHOUT_HSA_BACKEND