Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.18)
project(InfiniOps VERSION 0.1.0 LANGUAGES CXX)

include(GNUInstallDirs)
project(InfiniOps LANGUAGES CXX)

if(POLICY CMP0116)
cmake_policy(SET CMP0116 NEW)
Expand Down Expand Up @@ -36,7 +34,8 @@ option(BUILD_CUSTOM_KERNEL "Build custom AscendC kernel PyTorch extension (requi

option(AUTO_DETECT_DEVICES "Automatically detect available devices" OFF)
option(AUTO_DETECT_BACKENDS "Automatically detect available backends" OFF)
option(GENERATE_CPP_OPERATOR_API "Generate public C++ operator API" ON)
option(GENERATE_OPERATOR_CALL_INSTANTIATIONS
"Generate explicit operator call instantiations" ON)
option(GENERATE_PYTHON_BINDINGS "Generate Python bindings" OFF)

set(_DEFAULT_HYGON_DTK_ROOT "/opt/dtk")
Expand Down Expand Up @@ -322,13 +321,10 @@ if(WITH_ILUVATAR)
if(NOT ILUVATAR_CUDA_COMPILER)
message(FATAL_ERROR "`WITH_ILUVATAR` is `ON` but CoreX `clang++` was not found.")
endif()
get_filename_component(ILUVATAR_CUDA_BIN_DIR "${ILUVATAR_CUDA_COMPILER}" DIRECTORY)
get_filename_component(ILUVATAR_CUDA_ROOT "${ILUVATAR_CUDA_BIN_DIR}/.." ABSOLUTE)
set(CUDAToolkit_ROOT "${ILUVATAR_CUDA_ROOT}" CACHE PATH "Iluvatar CoreX toolkit root")
set(ILUVATAR_CUDA_FLAGS
"--cuda-gpu-arch=${ILUVATAR_ARCH};-fPIC;-Wno-error=unused-variable;-Wno-error=unused-private-field;-Wno-unused-variable;-std=c++17;--cuda-path=${ILUVATAR_CUDA_ROOT};-x;ivcore"
"--cuda-gpu-arch=${ILUVATAR_ARCH};-fPIC;-Wno-error=unused-variable;-Wno-error=unused-private-field;-Wno-unused-variable;-std=c++17;--cuda-path=/usr/local/corex;-x;ivcore"
CACHE STRING "Iluvatar CUDA compiler flags")
message(STATUS "Iluvatar: CUDA compiler ${ILUVATAR_CUDA_COMPILER}, arch ${ILUVATAR_ARCH}, toolkit ${ILUVATAR_CUDA_ROOT}")
message(STATUS "Iluvatar: CUDA compiler ${ILUVATAR_CUDA_COMPILER}, arch ${ILUVATAR_ARCH}")
find_package(CUDAToolkit REQUIRED)
endif()

Expand Down Expand Up @@ -446,7 +442,6 @@ if(WITH_MOORE)
find_library(MUSA_LIB NAMES musa HINTS "${MUSA_ROOT}/lib" REQUIRED)
find_library(MUSART_LIB NAMES musart HINTS "${MUSA_ROOT}/lib" REQUIRED)
find_library(MUBLAS_LIB NAMES mublas HINTS "${MUSA_ROOT}/lib" REQUIRED)
find_library(MUSA_OPENMP_LIB NAMES omp iomp5 HINTS "${MUSA_ROOT}/lib" REQUIRED)
endif()

if(WITH_CAMBRICON)
Expand Down Expand Up @@ -481,7 +476,6 @@ endif()

# If all other platforms are not enabled, CPU is enabled by default.
if(NOT WITH_NVIDIA AND NOT WITH_ILUVATAR AND NOT WITH_HYGON AND NOT WITH_METAX AND NOT WITH_MOORE AND NOT WITH_CAMBRICON AND NOT WITH_ASCEND)
set(WITH_CPU ON CACHE BOOL "Enable CPU backend" FORCE)
add_compile_definitions(WITH_CPU=1)
endif()

Expand Down
3 changes: 0 additions & 3 deletions cmake/InfiniOpsConfig.cmake.in

This file was deleted.

10 changes: 0 additions & 10 deletions cmake/infiniops.pc.in

This file was deleted.

2 changes: 1 addition & 1 deletion include/infini/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define INFINI_OPS_H_

#ifdef __cplusplus
#include <infini/functional_ops.h>
#include <infini/operator_call_instantiations.h>
#endif

#endif // INFINI_OPS_H_
Loading
Loading