!3 Add intel-cm-compiler package into 24.03 SP1
From: @juntianlinux Reviewed-by: @x56Jason Signed-off-by: @x56Jason
This commit is contained in:
commit
72a17537ec
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# intel-cm-compiler
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
Intel C for Metal Compiler
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# intel-cm-compiler
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
Intel C for Metal Compiler
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
|
||||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
BIN
intel-cm-compiler-1.0.144.tar.gz
Normal file
BIN
intel-cm-compiler-1.0.144.tar.gz
Normal file
Binary file not shown.
126
intel-cm-compiler.spec
Normal file
126
intel-cm-compiler.spec
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
# Copyright (C) 2023 Intel Corporation
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
%global pkg_name intel-cm-compiler
|
||||||
|
%global lib_ver 1.0.144
|
||||||
|
%global openeuler_release 1
|
||||||
|
|
||||||
|
Name: %{pkg_name}
|
||||||
|
Version: %{lib_ver}
|
||||||
|
Release: %{openeuler_release}%{?dist}
|
||||||
|
Summary: Intel(R) C for Metal Compiler
|
||||||
|
License: MIT
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
URL: https://github.com/intel/cm-compiler
|
||||||
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
#This package is x86 only
|
||||||
|
ExclusiveArch: x86_64
|
||||||
|
|
||||||
|
# Details for building intel-cm-compiler tree
|
||||||
|
#<workspace>
|
||||||
|
# |- cmclang https://github.com/intel/cm-compiler/archive/22f9dbf8bd44/cmclang.tar.gz
|
||||||
|
# |- spirv-llvm https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/26db0ab3f4ea/spirv-llvm.tar.gz
|
||||||
|
# |- vc-intrinsics https://github.com/intel/vc-intrinsics/archive/v0.14.0/vc-intrinsics.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: bison cmake make patch gcc-c++ flex python3
|
||||||
|
BuildRequires: pkg-config libxml2-devel git valgrind
|
||||||
|
|
||||||
|
%description
|
||||||
|
Intel(R) C for Metal Compiler -- CM Frontend lib
|
||||||
|
The Intel(R) C for Metal compiler is a open source compiler that implements C
|
||||||
|
for Metal programming language. C for Metal is a new GPU kernel programming
|
||||||
|
language for Intel(R) Graphics.
|
||||||
|
|
||||||
|
%package -n intel-igc-cm
|
||||||
|
Summary: Intel(R) C for Metal Compiler
|
||||||
|
Requires: intel-igc-core >= 1.0.12812
|
||||||
|
%description -n intel-igc-cm
|
||||||
|
Intel(R) C for Metal Compiler -- CM Frontend lib
|
||||||
|
The Intel(R) C for Metal compiler is a open source compiler that implements C
|
||||||
|
for Metal programming language. C for Metal is a new GPU kernel programming
|
||||||
|
language for Intel(R) Graphics.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS="${RPM_OPT_FLAGS}"
|
||||||
|
export CXXFLAGS="${RPM_OPT_FLAGS}"
|
||||||
|
|
||||||
|
mkdir build-llvm
|
||||||
|
mkdir install
|
||||||
|
|
||||||
|
pushd build-llvm
|
||||||
|
cmake ../cmclang/llvm \
|
||||||
|
-Wno-dev \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{_builddir}/install \
|
||||||
|
-DLLVM_INCLUDE_TOOLS=OFF \
|
||||||
|
-DLLVM_INCLUDE_TESTS=OFF \
|
||||||
|
-DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF \
|
||||||
|
-DLLVM_ENABLE_TERMINFO=OFF \
|
||||||
|
-DLLVM_ENABLE_Z3_SOLVER=OFF \
|
||||||
|
-DLLVM_TARGETS_TO_BUILD="X86"
|
||||||
|
%make_build
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir build-vcint
|
||||||
|
pushd build-vcint
|
||||||
|
cmake ../vc-intrinsics \
|
||||||
|
-Wno-dev \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{_builddir}/install \
|
||||||
|
-DLLVM_DIR=%{_builddir}/install/lib/cmake/llvm
|
||||||
|
%make_build
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir build-spirv
|
||||||
|
pushd build-spirv
|
||||||
|
cmake ../spirv-llvm \
|
||||||
|
-Wno-dev \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{_builddir}/install \
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-DLLVM_DIR=%{_builddir}/install/lib/cmake/llvm
|
||||||
|
%make_build
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir build_cmclang
|
||||||
|
pushd build_cmclang
|
||||||
|
cmake ../cmclang/clang \
|
||||||
|
-Wno-dev \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{_builddir}/install \
|
||||||
|
-DCLANG_ANALYZER_ENABLE_Z3_SOLVER=FALSE \
|
||||||
|
-DLLVMGenXIntrinsics_DIR=%{_builddir}/install/lib/cmake/LLVMGenXIntrinsics \
|
||||||
|
-DLLVM_INCLUDE_TESTS=OFF \
|
||||||
|
-DLLVM_DIR=%{_builddir}/install/lib/cmake/llvm \
|
||||||
|
-DSPIRV_TRANSLATOR_DIR=%{_builddir}/install \
|
||||||
|
-DFEWRAPPER_VERSION=%{version}
|
||||||
|
%make_build
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
cp -aR %{_builddir}/install/lib/libclangFEWrapper.so* %{buildroot}%{_libdir}
|
||||||
|
cp -aR %{_builddir}/install/bin/cmc %{buildroot}%{_bindir}
|
||||||
|
rm -f cmclang/clang/lib/Headers/cm/include/*.txt
|
||||||
|
mkdir -p %{buildroot}%{_includedir}
|
||||||
|
cp -R cmclang/clang/lib/Headers/cm/include/* %{buildroot}%{_includedir}
|
||||||
|
|
||||||
|
%files -n intel-igc-cm
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%license cmclang/clang/LICENSE.TXT
|
||||||
|
%{_bindir}/cmc
|
||||||
|
%{_libdir}/libclangFEWrapper.so*
|
||||||
|
%{_includedir}/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Dec 8 2023 Aubrey Li <aubrey.li@linux.intel.com> - 1.0.144-1
|
||||||
|
- Initial spec file
|
||||||
Loading…
x
Reference in New Issue
Block a user