blob: 6df6d022de33d52e27109e4d857daac2e84e4624 [file] [log] [blame]
// Copyright 2021 The IREE Authors
//
// Licensed 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
namespace iree.hal.rocm;
// 'ROCM Executable'.
file_identifier "ROCM";
file_extension "rocm";
// A struct for the kernel block size along each dimensions.
struct BlockSizeDef {
x:uint32;
y:uint32;
z:uint32;
}
// A struct for a source code location that consists of a file name and
// a line number within that file.
table FileLineLocDef {
filename:string;
line:int32;
}
// Source location keyed by a string compilation stage name.
table StageLocationDef {
stage:string;
location:FileLineLocDef;
}
// Table of stage locations sorted in ascending order by stage name.
table StageLocationsDef {
locations:[StageLocationDef];
}
// An embedded source file referenced by locations in the file.
table SourceFileDef {
path:string;
content:[uint8];
}
table ExecutableDef {
// A map of entry point ordinals to string names as used in the shader
// library.
entry_points:[string];
// Block sizes for each entry point.
// This list has the same size as the entry_points list.
block_sizes:[BlockSizeDef];
// Size of dynamic shared memory.
// This list has the same size as the entry_points list.
shared_memory_sizes:[uint32];
// HSACO string of the module.
hsaco_image:string;
// A map of entry point ordinals to source locations.
// This information is optional and may be used by debuggers and profilers to
// associate executable entry points with the source that generated them.
source_locations:[FileLineLocDef];
// Table of source locations per entry point keyed by a string compilation
// stage name. Sorted ascending by name.
stage_locations:[StageLocationsDef];
// Embedded source files sorted ascending by path.
source_files:[SourceFileDef];
}
root_type ExecutableDef;