Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

trying to setup a windows build for the slice oper #13

Description

@tomermerhav

steps:

  1. created a custom cmakelists.txt file, to compile on windows (not all steps copied from makefile yet..):
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)

project(${PROJ_NAME} LANGUAGES CXX CUDA)
set(PROJ_NAME hdrnetcompile)
file(GLOB_RECURSE "mySOURCES" ${CMAKE_CURRENT_LIST_DIR}/ops/*.cc )
message("${CMAKE_PREFIX_PATH}")
#find_package(CUDAToolkit)
add_library(${PROJ_NAME} SHARED ${mySOURCES})
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "-${CMAKE_CXX_FLAGS_DEBUG} /MTd")
message(${CMAKE_CXX_FLAGS_DEBUG})

target_compile_features(${PROJ_NAME} PUBLIC cxx_std_17)
target_compile_options(${PROJ_NAME} PUBLIC $<$<COMPILE_LANGUAGE:CUDA>: --generate-code arch=compute_61,code=sm_61>) 

set_target_properties( ${PROJ_NAME}
                       PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
set_target_properties(${PROJ_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)



get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
    unset(MATCHED)
    string(REGEX MATCH "CMAKE_CUDA_FLAGS_" MATCHED ${_variableName})
    if (NOT MATCHED)
        continue()
    endif()
    string(REPLACE -MD -MT ${_variableName} ${${_variableName}})
    unset(MATCHED2)
    string(REGEX MATCH "DEB" MATCHED2 ${_variableName})
    if (MATCHED2)
        string(APPEND ${_variableName} " -G" )
    endif()
    message(STATUS "${_variableName}=${${_variableName}}")
endforeach()



target_include_directories(${PROJ_NAME} PUBLIC ${CUDAToolkit_INCLUDE_DIR})
target_include_directories(${PROJ_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../..)
target_include_directories(${PROJ_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../../third_party/tensorflow)
  1. cloned current tensorflow into third_party\tensorflow
  2. cloned https://github.com/dsharlet/array into third_party\array

visual studio version:
16.6.1

when I build, I get these errors:
1>C:\Users\User\Downloads\hdrnet-master\third_party\tensorflow\tensorflow/core/framework/full_type_util.h(22,10): fatal error C1083: Cannot open include file: 'tensorflow/core/framework/full_type.pb.h': No such file or directory

i.e. - tensorflow itself, in the last commit, has an include problem, inside op.h
note that I included the correct target_include_directories in cmakelists.txt. This can be seen here:

image

i,e - other includes are found correctly (no red underline...)

moreover, I noticed the people are using tensorflow_cc to compile the c++ api for tensorflow. Is that a better path to proceed to ?

please advice

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions