mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
oclock fixes
Change-Id: I446ba2a489bf2f58fbf4211b71279d7d48c8a065
This commit is contained in:
@ -264,7 +264,7 @@ Kernel-scope data (<kname> is replaced by corresponding kernel's name):
|
||||
Usage: ocloc disasm -file <file> [-patch <patchtokens_dir>] [-dump <dump_dir>] [-device <device_type>]
|
||||
-file <file> Input file to be disassembled.
|
||||
This file should be an Intel OpenCL GPU device binary.
|
||||
|
||||
|
||||
-patch <patchtokens_dir> Optional path to the directory containing
|
||||
patchtoken definitions (patchlist.h, etc.)
|
||||
as defined in intel-graphics-compiler (IGC) repo,
|
||||
@ -272,19 +272,19 @@ Usage: ocloc disasm -file <file> [-patch <patchtokens_dir>] [-dump <dump_dir>] [
|
||||
IGC/AdaptorOCL/ocl_igc_shared/executable_format
|
||||
By default (when patchtokens_dir is not provided)
|
||||
patchtokens won't be decoded.
|
||||
|
||||
|
||||
-dump <dump_dir> Optional path for files representing decoded binary.
|
||||
Default is './dump'.
|
||||
|
||||
Default is './dump'.
|
||||
|
||||
-device <device_type> Optional target device of input binary
|
||||
<device_type> can be: %s
|
||||
By default ocloc will pick base device within
|
||||
a generation - i.e. both skl and kbl will
|
||||
fallback to skl. If specific product (e.g. kbl)
|
||||
is needed, provide it as device_type.
|
||||
|
||||
|
||||
--help Print this usage message.
|
||||
|
||||
|
||||
Examples:
|
||||
Disassemble Intel OpenCL GPU device binary
|
||||
ocloc disasm -file source_file_Gen9core.bin
|
||||
|
@ -17,13 +17,13 @@
|
||||
#include <vector>
|
||||
|
||||
struct PTField {
|
||||
uint8_t size;
|
||||
uint8_t size = 0U;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
struct BinaryHeader {
|
||||
std::vector<PTField> fields;
|
||||
uint32_t size;
|
||||
uint32_t size = 0U;
|
||||
};
|
||||
struct PatchToken : BinaryHeader {
|
||||
std::string name;
|
||||
|
@ -158,9 +158,9 @@ Usage: ocloc asm -out <out_file> [-dump <dump_dir>] [-device <device_type>]
|
||||
a generation - i.e. both skl and kbl will
|
||||
fallback to skl. If specific product (e.g. kbl)
|
||||
is needed, provide it as device_type.
|
||||
|
||||
|
||||
--help Print this usage message.
|
||||
|
||||
|
||||
Examples:
|
||||
Assemble to Intel OpenCL GPU device binary
|
||||
ocloc asm -out reassembled.bin
|
||||
|
@ -20,8 +20,8 @@ struct IgaWrapper {
|
||||
|
||||
IgaWrapper(IgaWrapper &) = delete;
|
||||
IgaWrapper(const IgaWrapper &&) = delete;
|
||||
IgaWrapper &operator=(IgaWrapper &) = delete;
|
||||
IgaWrapper &operator=(const IgaWrapper &&) = delete;
|
||||
IgaWrapper &operator=(const IgaWrapper &) = delete;
|
||||
IgaWrapper &operator=(IgaWrapper &&) = delete;
|
||||
|
||||
MOCKABLE_VIRTUAL bool tryDisassembleGenISA(const void *kernelPtr, uint32_t kernelSize, std::string &out);
|
||||
MOCKABLE_VIRTUAL bool tryAssembleGenISA(const std::string &inAsm, std::string &outBinary);
|
||||
@ -39,5 +39,5 @@ struct IgaWrapper {
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> pimpl;
|
||||
|
||||
MessagePrinter *messagePrinter;
|
||||
MessagePrinter *messagePrinter = nullptr;
|
||||
};
|
||||
|
@ -36,8 +36,8 @@ Available commands are listed below.
|
||||
Use 'ocloc <command> --help' to get help about specific command.
|
||||
|
||||
Commands:
|
||||
compile Compiles input to Intel OpenCL GPU device binary.
|
||||
disasm Disassembles Intel OpenCL GPU device binary.
|
||||
compile Compiles input to Intel OpenCL GPU device binary.
|
||||
disasm Disassembles Intel OpenCL GPU device binary.
|
||||
asm Assembles Intel OpenCL GPU device binary.
|
||||
multi Compiles multiple files using a config file.
|
||||
|
||||
@ -46,10 +46,10 @@ Default command (when none provided) is 'compile'.
|
||||
Examples:
|
||||
Compile file to Intel OpenCL GPU device binary (out = source_file_Gen9core.bin)
|
||||
ocloc -file source_file.cl -device skl
|
||||
|
||||
|
||||
Disassemble Intel OpenCL GPU device binary
|
||||
ocloc disasm -file source_file_Gen9core.bin
|
||||
|
||||
|
||||
Assemble to Intel OpenCL GPU device binary (after above disasm)
|
||||
ocloc asm -out reassembled.bin
|
||||
)===");
|
||||
@ -110,4 +110,5 @@ int main(int numArgs, const char *argv[]) {
|
||||
printf("%s\n", e.what());
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -663,40 +663,40 @@ Different input and intermediate file formats are available.
|
||||
|
||||
Usage: ocloc [compile] -file <filename> -device <device_type> [-output <filename>] [-out_dir <output_dir>] [-options <options>] [-32|-64] [-internal_options <options>] [-llvm_text|-llvm_input|-spirv_input] [-options_name] [-q] [-cpp_file] [--help]
|
||||
|
||||
-file <filename> The input file to be compiled
|
||||
(by default input source format is
|
||||
-file <filename> The input file to be compiled
|
||||
(by default input source format is
|
||||
OpenCL C kernel language).
|
||||
|
||||
-device <device_type> Target device.
|
||||
<device_type> can be: %s
|
||||
|
||||
|
||||
-output <filename> Optional output file base name.
|
||||
Default is input file's base name.
|
||||
This base name will be used for all output
|
||||
files. Proper sufixes (describing file formats)
|
||||
will be added automatically.
|
||||
|
||||
|
||||
-out_dir <output_dir> Optional output directory.
|
||||
Default is current working directory.
|
||||
|
||||
|
||||
-options <options> Optional OpenCL C compilation options
|
||||
as defined by OpenCL specification.
|
||||
|
||||
|
||||
-32 Forces target architecture to 32-bit pointers.
|
||||
Default pointer size is inherited from
|
||||
ocloc's pointer size.
|
||||
This option is exclusive with -64.
|
||||
|
||||
|
||||
-64 Forces target architecture to 64-bit pointers.
|
||||
Default pointer size is inherited from
|
||||
ocloc's pointer size.
|
||||
This option is exclusive with -32.
|
||||
|
||||
|
||||
-internal_options <options> Optional compiler internal options
|
||||
as defined by compilers used underneath.
|
||||
Check intel-graphics-compiler (IGC) project
|
||||
for details on available internal options.
|
||||
|
||||
|
||||
-llvm_text Forces intermediate representation (IR) format
|
||||
to human-readable LLVM IR (.ll).
|
||||
This option affects only output files
|
||||
@ -710,12 +710,12 @@ Usage: ocloc [compile] -file <filename> -device <device_type> [-output <filename
|
||||
Default is OpenCL C kernel language.
|
||||
This option is exclusive with -spirv_input.
|
||||
This option is exclusive with -llvm_text.
|
||||
|
||||
|
||||
-spirv_input Indicates that input file is a spirV binary.
|
||||
Default is OpenCL C kernel language format.
|
||||
This option is exclusive with -llvm_input.
|
||||
This option is exclusive with -llvm_text.
|
||||
|
||||
|
||||
-options_name Will add suffix to output files.
|
||||
This suffix will be generated based on input
|
||||
options (useful when rebuilding with different
|
||||
@ -726,14 +726,14 @@ Usage: ocloc [compile] -file <filename> -device <device_type> [-output <filename
|
||||
It does not affect '--output' parameter and can
|
||||
be used along with it ('--output' parameter
|
||||
defines the base name - i.e. prefix).
|
||||
|
||||
|
||||
-q Will silence most of output messages.
|
||||
|
||||
|
||||
-cpp_file Will generate c++ file with C-array
|
||||
containing Intel OpenCL device binary.
|
||||
|
||||
|
||||
--help Print this usage message.
|
||||
|
||||
|
||||
Examples :
|
||||
Compile file to Intel OpenCL GPU device binary (out = source_file_Gen9core.bin)
|
||||
ocloc -file source_file.cl -device skl
|
||||
|
Reference in New Issue
Block a user