Unverified Commit 9ab65d2c authored by Ruilong Li(李瑞龙)'s avatar Ruilong Li(李瑞龙) Committed by GitHub
Browse files

update workflow; fix Literal (#193)

* update workflow; fix Literal

* fix format
parent 627d4446
...@@ -12,35 +12,50 @@ jobs: ...@@ -12,35 +12,50 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-20.04, windows-2019] os: [ubuntu-20.04, windows-2019]
python-version: ['3.7', '3.8', '3.9'] # support version based on: https://download.pytorch.org/whl/torch/
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
torch-version: [1.11.0, 1.12.0, 1.13.0, 2.0.0] torch-version: [1.11.0, 1.12.0, 1.13.0, 2.0.0]
cuda-version: ['cu113', 'cu116', 'cu117', 'cu118'] cuda-version: ['cu102', cu113', 'cu115', 'cu116', 'cu117', 'cu118']
# os: [ubuntu-18.04]
# python-version: ['3.9']
# torch-version: [1.10.0]
# cuda-version: ['cu102']
exclude: exclude:
- torch-version: 1.11.0
python-version: '3.11'
- torch-version: 1.11.0 - torch-version: 1.11.0
cuda-version: 'cu116' cuda-version: 'cu116'
- torch-version: 1.11.0 - torch-version: 1.11.0
cuda-version: 'cu117' cuda-version: 'cu117'
- torch-version: 1.11.0
cuda-version: 'cu118'
- torch-version: 1.12.0
python-version: '3.11'
- torch-version: 1.12.0
cuda-version: 'cu115'
- torch-version: 1.12.0 - torch-version: 1.12.0
cuda-version: 'cu117' cuda-version: 'cu117'
- torch-version: 1.12.0
cuda-version: 'cu118'
- torch-version: 1.13.0 - torch-version: 1.13.0
cuda-version: 'cu102' cuda-version: 'cu102'
- torch-version: 1.13.0 - torch-version: 1.13.0
cuda-version: 'cu113' cuda-version: 'cu113'
- torch-version: 1.13.0
cuda-version: 'cu115'
- torch-version: 1.13.0
cuda-version: 'cu118'
- torch-version: 2.0.0 - torch-version: 2.0.0
python-version: '3.7' python-version: '3.7'
- torch-version: 2.0.0
cuda-version: 'cu102'
- torch-version: 2.0.0 - torch-version: 2.0.0
cuda-version: 'cu113' cuda-version: 'cu113'
- torch-version: 2.0.0
cuda-version: 'cu115'
- torch-version: 2.0.0 - torch-version: 2.0.0
cuda-version: 'cu116' cuda-version: 'cu116'
- os: windows-2019 - os: windows-2019
torch-version: 1.11.0
cuda-version: 'cu102'
- os: windows-2019
torch-version: 1.12.0
cuda-version: 'cu102' cuda-version: 'cu102'
steps: steps:
......
# cmake_minimum_required(VERSION 3.3)
# project(nerfacc LANGUAGES CXX CUDA)
# find_package(pybind11 REQUIRED)
# find_package(Torch REQUIRED)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
# set(SOURCE_DIR nerfacc/cuda/csrc)
# set(INCLUDE_DIR nerfacc/cuda/csrc/include)
# file(GLOB SOURCES ${SOURCE_DIR}/*.cu)
# pybind11_add_module(${PROJECT_NAME} SHARED ${SOURCES})
# target_link_libraries(${PROJECT_NAME} PRIVATE "${TORCH_LIBRARIES}")
# target_include_directories(${PROJECT_NAME} PRIVATE "${INCLUDE_DIR}")
# # message(STATUS "CUDA enabled")
# # set( CMAKE_CUDA_STANDARD 14 )
# # set( CMAKE_CUDA_STANDARD_REQUIRED ON)
# # find_package(pybind11 REQUIRED)
# # # find_package(Python3 REQUIRED COMPONENTS Development)
# # # target_link_libraries(${PROJECT_NAME} PRIVATE Python3::Python)
# # find_package(Torch REQUIRED)
# # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
# # target_link_libraries(${PROJECT_NAME} PRIVATE ${TORCH_LIBRARIES})
# # set(CSRC nerfacc/cuda/csrc)
# # file(GLOB_RECURSE ALL_SOURCES ${ALL_SOURCES} ${CSRC}/*.cu)
# # file(GLOB_RECURSE ALL_HEADERS ${CSRC}/include/*.h)
# # add_library(${PROJECT_NAME} SHARED ${ALL_SOURCES})
# # target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
# # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
# # message("-- CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
# # message("-- CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
# # message("-- CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
# # set_target_properties(${PROJECT_NAME} PROPERTIES
# # EXPORT_NAME nerfacc
# # INSTALL_RPATH ${TORCH_INSTALL_PREFIX}/lib)
# # Cmake creates *.dylib by default, but python expects *.so by default
# # if (APPLE)
# # set_property(TARGET ${PROJECT_NAME} PROPERTY SUFFIX .so)
# # endif()
\ No newline at end of file
...@@ -3,7 +3,12 @@ Copyright (c) 2022 Ruilong Li, UC Berkeley. ...@@ -3,7 +3,12 @@ Copyright (c) 2022 Ruilong Li, UC Berkeley.
""" """
import random import random
from typing import Literal, Optional, Sequence from typing import Optional, Sequence
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
import numpy as np import numpy as np
import torch import torch
......
from typing import Callable, List, Literal, Optional, Tuple from typing import Callable, List, Optional, Tuple
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
import torch import torch
from torch import Tensor from torch import Tensor
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
Copyright (c) 2022 Ruilong Li, UC Berkeley. Copyright (c) 2022 Ruilong Li, UC Berkeley.
""" """
__version__ = "0.5.0" __version__ = "0.5.1"
...@@ -105,7 +105,7 @@ setup( ...@@ -105,7 +105,7 @@ setup(
download_url=f"{URL}/archive/{__version__}.tar.gz", download_url=f"{URL}/archive/{__version__}.tar.gz",
keywords=[], keywords=[],
python_requires=">=3.7", python_requires=">=3.7",
install_requires=["rich>=12", "torch"], install_requires=["rich>=12", "torch", "typing_extensions; python_version<'3.8'"],
extras_require={ extras_require={
# dev dependencies. Install them by `pip install nerfacc[dev]` # dev dependencies. Install them by `pip install nerfacc[dev]`
"dev": [ "dev": [
......
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