intel / intel-graphics-compiler

Other
594 stars 155 forks source link

Guidence for building igc on virtual box #294

Closed aabhinavg closed 7 months ago

aabhinavg commented 1 year ago

https://github.com/intel/intel-graphics-compiler/tree/master/scripts I am using the script buildIGC.sh

Can anyone guide me on how to use it for a smooth build process if I want to build it on virtual box.

pszymich commented 1 year ago

Hi @aabhinavg, what problems did you come across? Please have a look at our build_ubuntu.md document.

aabhinavg commented 1 year ago

Hi @pszymich I am getting error while running make command

as ] Built target obj.clangFrontend [ 40%] Generating ../Release/GenIntrinsicDescription.h, ../Release/GenIntrinsicDefinition.h, ../Release/GenIntrinsicEnum.h, ../Release/GenIntrinsicLookupTable.h, ../Release/GenIntrinsicDefinition.cpp Traceback (most recent call last): File "generate_intrinsic_files.py", line 29, in main(sys.argv) File "generate_intrinsic_files.py", line 26, in main intrinsic_definitions = generate_type_definitions_from_modules(args.inputs) File "/home/ht/workspace/igc/IGC/GenISAIntrinsics/generator/Intrinsic_definition_translation.py", line 135, in generate_type_definitions_from_modules spec = importlib.util.spec_from_file_location(Path(el).stem, el) AttributeError: module 'importlib' has no attribute 'util' make[2]: [IGC/GenISAIntrinsics/CMakeFiles/GenISAIntrinsics.dir/build.make:84: IGC/Release/GenIntrinsicDescription.h] Error 1 make[1]: [CMakeFiles/Makefile2:33579: IGC/GenISAIntrinsics/CMakeFiles/GenISAIntrinsics.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... ] Built target obj.clangFrontend [ 40%] Generating ../Release/GenIntrinsicDescription.h, ../Release/GenIntrinsicDefinition.h, ../Release/GenIntrinsicEnum.h, ../Release/GenIntrinsicLookupTable.h, ../Release/GenIntrinsicDefinition.cpp Traceback (most recent call last): File "generate_intrinsic_files.py", line 29, in main(sys.argv) File "generate_intrinsic_files.py", line 26, in main intrinsic_definitions = generate_type_definitions_from_modules(args.inputs) File "/home/ht/workspace/igc/IGC/GenISAIntrinsics/generator/Intrinsic_definition_translation.py", line 135, in generate_type_definitions_from_modules spec = importlib.util.spec_from_file_location(Path(el).stem, el) AttributeError: module 'importlib' has no attribute 'util' make[2]: [IGC/GenISAIntrinsics/CMakeFiles/GenISAIntrinsics.dir/build.make:84: IGC/Release/GenIntrinsicDescription.h] Error 1 make[1]: [CMakeFiles/Makefile2:33579: IGC/GenISAIntrinsics/CMakeFiles/GenISAIntrinsics.dir/all] Error 2 make[1]: Waiting for unfinished jobs....

I have followed the steps shown in thebuild_ubuntu.md

and following warning in CMAKE configuration CMake Warning (dev) at CMakeLists.txt:21 (set): Cannot set "IGC__IGC_TARGETS": current scope has no parent. This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:22 (set): Cannot set "IGC_LIBRARY_NAME": current scope has no parent. This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:23 (set): Cannot set "FCL_LIBRARY_NAME": current scope has no parent. This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done (37.4s

aabhinavg commented 1 year ago

HI @pszymich I was able to solve the build issue by doing some modification in the python code. I am following the build_ubuntu.md directory hirerachy. Inside workspace i have cloned everythings workspace mkdir build cd build cmake ../igc make -j nproc sudo make install

Till here i dont got any error But now I am not able to see the igc binaries. Where they are located and how to use the igc compiler can you share some documentation or step.?

pszymich commented 7 months ago

IGC can be invoked by compute-runtime (https://github.com/intel/compute-runtime) or the ocloc tool that is a part of the runtime binaries. make install should compile, link and install IGC, the binaries should be in the build directory. Please reopen or file a new issue if you experience further problems, thank you.