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
76 lines
4.2 KiB
MLIR
76 lines
4.2 KiB
MLIR
// REQUIRES: target=x86{{.*}}
|
|
|
|
// RUN: mlir-opt -transform-interpreter -split-input-file %s --verify-diagnostics
|
|
|
|
// Check that processor features, like AVX, are appropriated derived and queryable.
|
|
|
|
// expected-remark @+2 {{attr associated to ["features", "+avx"] = unit}}
|
|
// expected-remark @below {{attr associated to ["features", "avx"] = true}}
|
|
module attributes { llvm.target = #llvm.target<triple = "x86_64-unknown-linux",
|
|
chip = "skylake">,
|
|
test.dl_spec = #dlti.dl_spec<index = 32> } {
|
|
func.func private @f()
|
|
}
|
|
|
|
module attributes {transform.with_named_sequence} {
|
|
transform.named_sequence @__transform_main(%arg: !transform.any_op) {
|
|
%funcs = transform.structured.match ops{["func.func"]} in %arg : (!transform.any_op) -> !transform.any_op
|
|
%module = transform.get_parent_op %funcs : (!transform.any_op) -> !transform.any_op
|
|
%mod = transform.apply_registered_pass "llvm-target-to-target-features" to %module : (!transform.any_op) -> !transform.any_op
|
|
%plus_avx = transform.dlti.query ["features", "+avx"] at %mod : (!transform.any_op) -> !transform.any_param
|
|
transform.debug.emit_param_as_remark %plus_avx, "attr associated to [\"features\", \"+avx\"] =" at %mod : !transform.any_param, !transform.any_op
|
|
%avx = transform.dlti.query ["features", "avx"] at %mod : (!transform.any_op) -> !transform.any_param
|
|
transform.debug.emit_param_as_remark %avx, "attr associated to [\"features\", \"avx\"] =" at %mod : !transform.any_param, !transform.any_op
|
|
transform.yield
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
// Check that newer processor features, like AMX, are appropriated derived and queryable.
|
|
|
|
// expected-remark @+2 {{attr associated to ["features", "+amx-bf16"] = unit}}
|
|
// expected-remark @below {{attr associated to ["features", "amx-bf16"] = true}}
|
|
module attributes { llvm.target = #llvm.target<triple = "x86_64-unknown-linux",
|
|
chip = "sapphirerapids">,
|
|
test.dl_spec = #dlti.dl_spec<index = 32> } {
|
|
func.func private @f()
|
|
}
|
|
|
|
module attributes {transform.with_named_sequence} {
|
|
transform.named_sequence @__transform_main(%arg: !transform.any_op) {
|
|
%funcs = transform.structured.match ops{["func.func"]} in %arg : (!transform.any_op) -> !transform.any_op
|
|
%module = transform.get_parent_op %funcs : (!transform.any_op) -> !transform.any_op
|
|
%mod = transform.apply_registered_pass "llvm-target-to-target-features" to %module : (!transform.any_op) -> !transform.any_op
|
|
%plus_avx = transform.dlti.query ["features", "+amx-bf16"] at %mod : (!transform.any_op) -> !transform.any_param
|
|
transform.debug.emit_param_as_remark %plus_avx, "attr associated to [\"features\", \"+amx-bf16\"] =" at %mod : !transform.any_param, !transform.any_op
|
|
%avx = transform.dlti.query ["features", "amx-bf16"] at %mod : (!transform.any_op) -> !transform.any_param
|
|
transform.debug.emit_param_as_remark %avx, "attr associated to [\"features\", \"amx-bf16\"] =" at %mod : !transform.any_param, !transform.any_op
|
|
transform.yield
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
// Check that features that a processor does not have, AMX in this case,
|
|
// aren't derived and hence that querying for them will fail.
|
|
|
|
// expected-error @+2 {{target op of failed DLTI query}}
|
|
// expected-note @below {{key "+amx-bf16" has no DLTI-mapping per attr: #llvm.target_features}}
|
|
module attributes { llvm.target = #llvm.target<triple = "x86_64-unknown-linux",
|
|
chip = "skylake">,
|
|
test.dl_spec = #dlti.dl_spec<index = 32> } {
|
|
func.func private @f()
|
|
}
|
|
|
|
module attributes {transform.with_named_sequence} {
|
|
transform.named_sequence @__transform_main(%arg: !transform.any_op) {
|
|
%funcs = transform.structured.match ops{["func.func"]} in %arg : (!transform.any_op) -> !transform.any_op
|
|
%module = transform.get_parent_op %funcs : (!transform.any_op) -> !transform.any_op
|
|
%mod = transform.apply_registered_pass "llvm-target-to-target-features" to %module : (!transform.any_op) -> !transform.any_op
|
|
// expected-error @below {{'transform.dlti.query' op failed to apply}}
|
|
%param = transform.dlti.query ["features", "+amx-bf16"] at %mod : (!transform.any_op) -> !transform.any_param
|
|
transform.yield
|
|
}
|
|
}
|