CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
94 lines
3.3 KiB
C++
94 lines
3.3 KiB
C++
//===- AMDGPUKernelCodeTUtils.h - helpers for amd_kernel_code_t -*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
/// \file AMDKernelCodeTUtils.h
|
|
/// MC layer struct for AMDGPUMCKernelCodeT, provides MCExpr functionality where
|
|
/// required.
|
|
///
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
|
|
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
|
|
|
|
#include "AMDKernelCodeT.h"
|
|
#include "llvm/ADT/ArrayRef.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
namespace llvm {
|
|
class MCAsmParser;
|
|
class MCContext;
|
|
class MCExpr;
|
|
class MCStreamer;
|
|
class MCSubtargetInfo;
|
|
class raw_ostream;
|
|
class MCAsmInfo;
|
|
namespace AMDGPU {
|
|
|
|
struct AMDGPUMCKernelCodeT {
|
|
AMDGPUMCKernelCodeT() = default;
|
|
|
|
// Names of most (if not all) members should match the ones used for table
|
|
// driven (array) generation in AMDKernelCodeTInfo.h.
|
|
uint32_t amd_kernel_code_version_major = 0;
|
|
uint32_t amd_kernel_code_version_minor = 0;
|
|
uint16_t amd_machine_kind = 0;
|
|
uint16_t amd_machine_version_major = 0;
|
|
uint16_t amd_machine_version_minor = 0;
|
|
uint16_t amd_machine_version_stepping = 0;
|
|
int64_t kernel_code_entry_byte_offset = 0;
|
|
int64_t kernel_code_prefetch_byte_offset = 0;
|
|
uint64_t kernel_code_prefetch_byte_size = 0;
|
|
uint64_t reserved0 = 0;
|
|
uint64_t compute_pgm_resource_registers = 0;
|
|
uint32_t code_properties = 0;
|
|
uint32_t workgroup_group_segment_byte_size = 0;
|
|
uint32_t gds_segment_byte_size = 0;
|
|
uint64_t kernarg_segment_byte_size = 0;
|
|
uint32_t workgroup_fbarrier_count = 0;
|
|
uint16_t reserved_vgpr_first = 0;
|
|
uint16_t reserved_vgpr_count = 0;
|
|
uint16_t reserved_sgpr_first = 0;
|
|
uint16_t reserved_sgpr_count = 0;
|
|
uint16_t debug_wavefront_private_segment_offset_sgpr = 0;
|
|
uint16_t debug_private_segment_buffer_sgpr = 0;
|
|
uint8_t kernarg_segment_alignment = 0;
|
|
uint8_t group_segment_alignment = 0;
|
|
uint8_t private_segment_alignment = 0;
|
|
uint8_t wavefront_size = 0;
|
|
int32_t call_convention = 0;
|
|
uint8_t reserved3[12] = {0};
|
|
uint64_t runtime_loader_kernel_symbol = 0;
|
|
uint64_t control_directives[16] = {0};
|
|
|
|
const MCExpr *compute_pgm_resource1_registers = nullptr;
|
|
const MCExpr *compute_pgm_resource2_registers = nullptr;
|
|
|
|
const MCExpr *is_dynamic_callstack = nullptr;
|
|
const MCExpr *wavefront_sgpr_count = nullptr;
|
|
const MCExpr *workitem_vgpr_count = nullptr;
|
|
const MCExpr *workitem_private_segment_byte_size = nullptr;
|
|
|
|
void initDefault(const MCSubtargetInfo &STI, MCContext &Ctx,
|
|
bool InitMCExpr = true);
|
|
void validate(const MCSubtargetInfo *STI, MCContext &Ctx);
|
|
|
|
const MCExpr *&getMCExprForIndex(int Index);
|
|
|
|
using PrintHelper =
|
|
function_ref<void(const MCExpr *, raw_ostream &, const MCAsmInfo *)>;
|
|
bool ParseKernelCodeT(StringRef ID, MCAsmParser &MCParser, raw_ostream &Err);
|
|
void EmitKernelCodeT(raw_ostream &OS, MCContext &Ctx, PrintHelper Helper);
|
|
void EmitKernelCodeT(MCStreamer &OS, MCContext &Ctx);
|
|
};
|
|
|
|
} // end namespace AMDGPU
|
|
} // end namespace llvm
|
|
|
|
#endif // LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
|