Skip to content
Merged
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
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ bin
build
.lintbin

# Project-local LLVM installation (created by following prerequisite validation instructions)
.llvm/
llvm.sh

nvfuser_common/version.py
nvfuser_common/include
nvfuser_comon/lib
Expand Down
34 changes: 0 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ endif()

message(STATUS "Setting NVFUSER_DISTRIBUTED=${NVFUSER_DISTRIBUTED}")

# NCCL include directory for distributed builds
# This can be set by the Python build system when using pip-bundled NCCL
set(NCCL_INCLUDE_DIR "" CACHE PATH "Directory containing nccl.h header")
if(NVFUSER_DISTRIBUTED AND NCCL_INCLUDE_DIR)
message(STATUS "Using NCCL include dir: ${NCCL_INCLUDE_DIR}")
endif()

# We try to update which C++ standard we use together in lockstep across all
# built libraries, and these variables control which that is. Generally we are
# on C++20, but we still support a version of CUDA (11) that does not recognize
Expand Down Expand Up @@ -443,29 +436,6 @@ list(APPEND NVFUSER_SRCS

# Add LLVM JIT related dependencies
set(LLVM_MINIMUM_VERSION "18.1")

# Check for project-local LLVM installations first (no sudo required)
# This searches .llvm/ directory for version-specific installations
if(NOT LLVM_DIR)
file(GLOB LLVM_CANDIDATES
"${CMAKE_SOURCE_DIR}/.llvm/*/lib/cmake/llvm"
"${CMAKE_SOURCE_DIR}/third_party/llvm/*/lib/cmake/llvm"
)
# Sort to get highest version first (assumes version numbers in paths)
list(SORT LLVM_CANDIDATES COMPARE NATURAL ORDER DESCENDING)
foreach(CANDIDATE ${LLVM_CANDIDATES})
if(EXISTS "${CANDIDATE}/LLVMConfig.cmake")
# Extract version from path to check if it meets minimum
string(REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+)" CANDIDATE_VERSION "${CANDIDATE}")
if(CANDIDATE_VERSION VERSION_GREATER_EQUAL LLVM_MINIMUM_VERSION)
set(LLVM_DIR "${CANDIDATE}" CACHE PATH "Path to LLVM CMake config")
message(STATUS "Found project-local LLVM ${CANDIDATE_VERSION} at ${LLVM_DIR}")
break()
endif()
endif()
endforeach()
endif()

find_package(LLVM REQUIRED CONFIG)
if(${LLVM_VERSION} VERSION_LESS ${LLVM_MINIMUM_VERSION})
message(FATAL_ERROR "LLVM ${LLVM_VERSION} does not meet the minimum version required: ${LLVM_MINIMUM_VERSION}")
Expand Down Expand Up @@ -558,10 +528,6 @@ target_include_directories(codegen_internal SYSTEM PUBLIC
PRIVATE
${CUDA_INCLUDE_DIRS}
)
# Add NCCL include path for distributed builds (from pip-bundled nvidia-nccl-cu*)
if(NVFUSER_DISTRIBUTED AND NCCL_INCLUDE_DIR)
target_include_directories(codegen_internal SYSTEM PRIVATE ${NCCL_INCLUDE_DIR})
endif()
target_include_directories(codegen_internal PUBLIC
"$<BUILD_INTERFACE:${NVFUSER_SRCS_DIR}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/nvfuser>"
Expand Down
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,20 @@ pip install -r python/requirements.txt
pip install --no-build-isolation -e python -v
```

### Prerequisite Validation

Prerequisites are automatically validated before building. If validation fails, follow the error message instructions.

**Validated**: Python, CMake, Ninja, pybind11, PyTorch (CUDA), System CUDA toolkit, Git submodules, GCC, LLVM

**Skip validation** (for CI or custom setups):
```bash
NVFUSER_BUILD_SKIP_VALIDATION=1 pip install --no-build-isolation -e python -v
```

See `python/setup.py` for all build environment variables.

Supported compilers:

**GCC:**

GCC 13+ is required (C++20 `<format>` header support). Recommended versions:
We support all "supported releases" of gcc as specified in [the official site](https://gcc.gnu.org/).
As of 3/2/2025, they are:

- gcc 12.4
- gcc 13.3
- gcc 14.2

Note: GCC 12 is not supported due to missing `<format>` header in libstdc++.

**Clang:**

- clang 19+
- clang 16+

Supported C++ standard:

Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools>=42", "wheel", "ninja", "cmake>=3.18", "pybind11[global]>=2.0"]
requires = ["setuptools>=42", "wheel", "ninja", "cmake>=3.18"]
build-backend = "setuptools.build_meta:__legacy__"
23 changes: 0 additions & 23 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@
# NVFUSER_BUILD_CPP_STANDARD=STANDARD
# Specify the C++ standard to use for building nvfuser. The default is C++20.
#
# NVFUSER_BUILD_SKIP_VALIDATION
# Skip prerequisite validation checks. Use this for CI or when you know
# all prerequisites are satisfied. Validation will still run if not set.
#

import os
import sys

from utils import (
Expand Down Expand Up @@ -101,24 +96,6 @@ def main():
# Override build config from environment variables
override_build_config_from_env(config)

# Prerequisite validation (can be skipped with NVFUSER_BUILD_SKIP_VALIDATION)
if not os.environ.get("NVFUSER_BUILD_SKIP_VALIDATION"):
try:
from tools.prereqs import validate_prerequisites

validate_prerequisites()
except ImportError as e:
# Prerequisite validation not available (shouldn't happen in dev)
print(f"WARNING: Could not import prerequisite validation: {e}")
except Exception as e:
# Prerequisite check failed
print(f"\n{e}\n", file=sys.stderr)
sys.exit(1)
else:
print(
"[nvFuser] Skipping prerequisite validation (NVFUSER_BUILD_SKIP_VALIDATION set)"
)

if "clean" in sys.argv:
# only disables BUILD_SETUP, but keep the argument for setuptools
config.build_setup = False
Expand Down
96 changes: 0 additions & 96 deletions python/tools/prereqs/__init__.py

This file was deleted.

140 changes: 0 additions & 140 deletions python/tools/prereqs/build_tools.py

This file was deleted.

Loading