Commit 08291b97 authored by Dmitry Rogozhkin's avatar Dmitry Rogozhkin Committed by Oleg Nabiullin

genx: simplify cmc and GenX_IR detection

Stop searching cmc and GenX_IR in the directory under $CMC_SEARCH_PATH
and rely on having these compiler executables in the PATH.
Signed-off-by: 's avatarDmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
parent 7a169ebf
......@@ -51,7 +51,6 @@ if(MFX_ENABLE_KERNELS)
-c -Qxcm -Qxcm_release -Qxcm_print_asm_count
-menableiga -mCM_init_global -mCM_printregusage
-Dtarget_${genx} -Qxcm_jit_target=${genx}
-isystem ${CMC_INCLUDE}
${src} -o ${tgt}_${genx}.isa)
add_custom_command(
......
......@@ -16,39 +16,12 @@ cmake -DBUILD_KERNELS=ON ...
## Shaders rebuild prerequisites
In order to rebuild the Shaders it is required to have CM compiler (aka CMC) and
some tools from Intel Graphics Compiler (aga IGC). They can me downloaded and
GenX_IR compiler from Intel Graphics Compiler (aka IGC). They can me downloaded and
installed from here:
* https://github.com/intel/cm-compiler
* https://github.com/intel/intel-graphics-compiler
Once you have built CMC and IGC make sure to export CMC_SEARCH_PATH environment
variable pointing to the directory with the structure similar to:
Once you have built CMC and IGC make sure that `cmc` and `GenX_IR` are in the search path:
```sh
.
├── bin
│   ├── cmc
│   └── GenX_IR # tool from IGC
└── include
└── cm
├── cm_atomic.h
├── cm_common.h
├── cm_dataport.h
├── cm_gateway.h
├── cm.h
├── cm_internal.h
├── cm_linear.h
├── cm_printf.h
├── cm_sampler.h
├── cm_send.h
├── cm_svm.h
├── cm_target.h
├── cmtl.h
├── cm_traits.h
├── cm_util.h
├── cm_vme.h
├── gen10_vme.h
├── gen11_vme.h
├── gen7_5_vme.h
├── gen8_vme.h
└── gen9_vme.h
export PATH=/path/to/cmc:/path/to/GenX_IR:$PATH
```
......@@ -82,22 +82,13 @@ cmake_dependent_option(
"MFX_ENABLE_KERNELS" OFF)
if (BUILD_KERNELS)
if(NOT DEFINED ENV{CMC_SEARCH_PATH})
message(FATAL_ERROR "No CMC search path provided (CMC_SEARCH_PATH)")
endif()
file(GLOB_RECURSE CMC $ENV{CMC_SEARCH_PATH}/*/cmc )
find_program(CMC cmc)
if(NOT CMC)
message(FATAL_ERROR "Failed to find cm compiler")
endif()
file(GLOB_RECURSE CMC_INCLUDE $ENV{CMC_SEARCH_PATH}/*/cm.h )
if(NOT CMC_INCLUDE)
message(FATAL_ERROR "Failed to find cm headers")
endif()
get_filename_component(CMC_INCLUDE ${CMC_INCLUDE} DIRECTORY)
set(CMC_INCLUDE "${CMC_INCLUDE}/..") # jumping out of 'cm' directory
file(GLOB_RECURSE GENX_IR $ENV{CMC_SEARCH_PATH}/*/GenX_IR )
find_program(GENX_IR GenX_IR)
if(NOT GENX_IR)
message(FATAL_ERROR "Failed to find GenX_IR compiler")
message(FATAL_ERROR "Failed to find GenX_IR compiler (part of IGC)")
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment