mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Enabling MLIR generated kernels by default on ROCm
This commit is contained in:
parent
0d1805aede
commit
24ee47b246
2
.bazelrc
2
.bazelrc
|
|
@ -248,8 +248,6 @@ build:tensorrt --repo_env TF_NEED_TENSORRT=1
|
||||||
build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain
|
build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain
|
||||||
build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true
|
build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true
|
||||||
build:rocm --repo_env TF_NEED_ROCM=1
|
build:rocm --repo_env TF_NEED_ROCM=1
|
||||||
# Generated kernels are not yet supported on ROCm.
|
|
||||||
build:rocm --//tensorflow/core/kernels/mlir_generated:enable_gpu=false
|
|
||||||
|
|
||||||
# Options extracted from configure script
|
# Options extracted from configure script
|
||||||
build:numa --define=with_numa_support=true
|
build:numa --define=with_numa_support=true
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,7 @@ def _gen_kernel_library(
|
||||||
)
|
)
|
||||||
|
|
||||||
# We have to use a sh_test instead of build_test because it doesn't properly find the dependent targets.
|
# We have to use a sh_test instead of build_test because it doesn't properly find the dependent targets.
|
||||||
|
gpu_arch_option = "sm_70,compute_75" if cuda_gpu_architectures() else ",".join(rocm_gpu_architectures())
|
||||||
native.sh_test(
|
native.sh_test(
|
||||||
name = "{op}_{platform}_{type}_{output_type}_gen_test".format(
|
name = "{op}_{platform}_{type}_{output_type}_gen_test".format(
|
||||||
op = op,
|
op = op,
|
||||||
|
|
@ -288,7 +289,7 @@ def _gen_kernel_library(
|
||||||
type = type,
|
type = type,
|
||||||
output_type = output_type,
|
output_type = output_type,
|
||||||
),
|
),
|
||||||
"--cpu_codegen=true" if enable_cpu else "--arch=sm_70,compute_75",
|
"--cpu_codegen=true" if enable_cpu else "--arch={}".format(gpu_arch_option),
|
||||||
],
|
],
|
||||||
size = "medium",
|
size = "medium",
|
||||||
data = [
|
data = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user