Halide
12.0.1
Halide compiler and libraries
|
#include <simd_op_check.h>
Public Member Functions | |
SimdOpCheckTest (const Target t, int w, int h) | |
virtual | ~SimdOpCheckTest ()=default |
void | set_seed (int seed) |
size_t | get_num_threads () const |
void | set_num_threads (size_t n) |
virtual bool | can_run_code () const |
virtual void | compile_and_check (Func error, const std::string &op, const std::string &name, int vector_width, std::ostringstream &error_msg) |
bool | wildcard_match (const char *p, const char *str) const |
bool | wildcard_match (const std::string &p, const std::string &str) const |
bool | wildcard_search (const std::string &p, const std::string &str) const |
TestResult | check_one (const std::string &op, const std::string &name, int vector_width, Expr e) |
void | check (std::string op, int vector_width, Expr e) |
virtual void | add_tests ()=0 |
virtual void | setup_images () |
virtual bool | test_all () |
Public Attributes | |
std::string | filter {"*"} |
std::string | output_directory {Internal::get_test_tmp_dir()} |
std::vector< Task > | tasks |
std::mt19937 | rng |
Target | target |
ImageParam | in_f32 {Float(32), 1, "in_f32"} |
ImageParam | in_f64 {Float(64), 1, "in_f64"} |
ImageParam | in_bf16 {BFloat(16), 1, "in_bf16"} |
ImageParam | in_i8 {Int(8), 1, "in_i8"} |
ImageParam | in_u8 {UInt(8), 1, "in_u8"} |
ImageParam | in_i16 {Int(16), 1, "in_i16"} |
ImageParam | in_u16 {UInt(16), 1, "in_u16"} |
ImageParam | in_i32 {Int(32), 1, "in_i32"} |
ImageParam | in_u32 {UInt(32), 1, "in_u32"} |
ImageParam | in_i64 {Int(64), 1, "in_i64"} |
ImageParam | in_u64 {UInt(64), 1, "in_u64"} |
const std::vector< ImageParam > | image_params {in_f32, in_f64, in_bf16, in_i8, in_u8, in_i16, in_u16, in_i32, in_u32, in_i64, in_u64} |
const std::vector< Argument > | arg_types {in_f32, in_f64, in_bf16, in_i8, in_u8, in_i16, in_u16, in_i32, in_u32, in_i64, in_u64} |
int | W |
int | H |
Definition at line 22 of file simd_op_check.h.
|
inline |
Definition at line 48 of file simd_op_check.h.
References Halide::Target::DisableLLVMLoopOpt, Halide::Target::NoAsserts, Halide::Target::NoBoundsQuery, Halide::Target::NoRuntime, Halide::Internal::ThreadPool< T >::num_processors_online(), target, and Halide::Target::with_feature().
|
virtualdefault |
|
inline |
Definition at line 59 of file simd_op_check.h.
References rng.
|
inline |
Definition at line 63 of file simd_op_check.h.
|
inline |
Definition at line 67 of file simd_op_check.h.
|
inlinevirtual |
Definition at line 71 of file simd_op_check.h.
References Halide::Target::arch, Halide::Target::ARMv7s, Halide::Target::AVX, Halide::Target::AVX2, Halide::Target::AVX512, Halide::Target::bits, Halide::Target::F16C, Halide::Target::FMA, Halide::Target::FMA4, Halide::get_host_target(), Halide::Target::has_feature(), Halide::Target::NoNEON, Halide::Target::os, Halide::Target::POWER_ARCH_2_07, Halide::Target::SSE41, target, Halide::Target::VSX, Halide::Target::WasmSimd128, and Halide::Target::WebAssembly.
Referenced by check_one().
|
inlinevirtual |
Definition at line 98 of file simd_op_check.h.
References arg_types, Halide::assembly, Halide::c_header, Halide::Func::compile_to(), Halide::Internal::get_output_info(), Halide::object, output_directory, target, Halide::Target::to_string(), and wildcard_search().
Referenced by check_one().
|
inline |
Definition at line 134 of file simd_op_check.h.
Referenced by check(), wildcard_match(), and wildcard_search().
|
inline |
Definition at line 164 of file simd_op_check.h.
References wildcard_match().
|
inline |
Definition at line 169 of file simd_op_check.h.
References wildcard_match().
Referenced by compile_and_check().
|
inline |
Definition at line 173 of file simd_op_check.h.
References Halide::absd(), Halide::Internal::IRHandle::accept(), arg_types, Halide::Func::bound(), buf, Halide::Internal::Call::call_type, can_run_code(), Halide::Func::clone_in(), compile_and_check(), Halide::Func::compile_to_assembly(), Halide::Func::compute_at(), Halide::Func::compute_root(), Halide::Float(), Halide::Internal::Call::func, H, Halide::Internal::Call::Halide, Halide::Internal::Function::has_update_definition(), image_params, Halide::Func::infer_input_bounds(), Halide::maximum(), Halide::Target::NoAsserts, Halide::Target::NoBoundsQuery, Halide::Target::NoRuntime, output_directory, Halide::Func::realize(), rng, setup_images(), target, Halide::Func::update(), Halide::Func::vectorize(), Halide::Internal::IRVisitor::visit(), W, Halide::Target::without_feature(), Halide::RDom::x, and Halide::RDom::y.
|
inline |
Definition at line 291 of file simd_op_check.h.
References filter, tasks, and wildcard_match().
|
pure virtual |
Referenced by test_all().
|
inlinevirtual |
|
inlinevirtual |
Definition at line 318 of file simd_op_check.h.
References add_tests(), Halide::Internal::ThreadPool< T >::async(), Halide::TestResult::error_msg, Halide::TestResult::op, and tasks.
std::string Halide::SimdOpCheckTest::filter {"*"} |
Definition at line 24 of file simd_op_check.h.
Referenced by check().
std::string Halide::SimdOpCheckTest::output_directory {Internal::get_test_tmp_dir()} |
Definition at line 25 of file simd_op_check.h.
Referenced by check_one(), and compile_and_check().
std::vector<Task> Halide::SimdOpCheckTest::tasks |
Definition at line 26 of file simd_op_check.h.
Referenced by check(), and test_all().
std::mt19937 Halide::SimdOpCheckTest::rng |
Definition at line 27 of file simd_op_check.h.
Referenced by check_one(), and set_seed().
Target Halide::SimdOpCheckTest::target |
Definition at line 29 of file simd_op_check.h.
Referenced by can_run_code(), check_one(), compile_and_check(), and SimdOpCheckTest().
ImageParam Halide::SimdOpCheckTest::in_f32 {Float(32), 1, "in_f32"} |
Definition at line 31 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_f64 {Float(64), 1, "in_f64"} |
Definition at line 32 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_bf16 {BFloat(16), 1, "in_bf16"} |
Definition at line 33 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_i8 {Int(8), 1, "in_i8"} |
Definition at line 34 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_u8 {UInt(8), 1, "in_u8"} |
Definition at line 35 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_i16 {Int(16), 1, "in_i16"} |
Definition at line 36 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_u16 {UInt(16), 1, "in_u16"} |
Definition at line 37 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_i32 {Int(32), 1, "in_i32"} |
Definition at line 38 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_u32 {UInt(32), 1, "in_u32"} |
Definition at line 39 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_i64 {Int(64), 1, "in_i64"} |
Definition at line 40 of file simd_op_check.h.
ImageParam Halide::SimdOpCheckTest::in_u64 {UInt(64), 1, "in_u64"} |
Definition at line 41 of file simd_op_check.h.
const std::vector<ImageParam> Halide::SimdOpCheckTest::image_params {in_f32, in_f64, in_bf16, in_i8, in_u8, in_i16, in_u16, in_i32, in_u32, in_i64, in_u64} |
Definition at line 43 of file simd_op_check.h.
Referenced by check_one(), and setup_images().
const std::vector<Argument> Halide::SimdOpCheckTest::arg_types {in_f32, in_f64, in_bf16, in_i8, in_u8, in_i16, in_u16, in_i32, in_u32, in_i64, in_u64} |
Definition at line 44 of file simd_op_check.h.
Referenced by check_one(), and compile_and_check().
int Halide::SimdOpCheckTest::W |
Definition at line 45 of file simd_op_check.h.
Referenced by check_one().
int Halide::SimdOpCheckTest::H |
Definition at line 46 of file simd_op_check.h.
Referenced by check_one().