Commit 0ab06415 authored by root's avatar root
Browse files

update hipcc-thrust resize example

parent 7fb5cae5
cmake_minimum_required(VERSION 3.16)
# Find hipcc executable
find_program(HIPCC_EXECUTABLE hipcc
PATHS /opt/dtk-25.04.3/bin
NO_DEFAULT_PATH
)
if(NOT HIPCC_EXECUTABLE)
find_program(HIPCC_EXECUTABLE hipcc REQUIRED)
endif()
# Find ROCm path
find_path(ROCM_ROOT
NAMES include/hip/hip_runtime.h
PATHS /opt/dtk-25.04.3
DOC "ROCm installation directory"
)
set(CMAKE_CXX_COMPILER ${HIPCC_EXECUTABLE})
project(resize_test LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 默认使用 Debug 模式(如果未指定)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
endif()
add_executable(resize-test resize-test.cpp)
# 设置 HIP 编译标志:包含 ROCm 路径、目标架构、调试信息
set_property(TARGET resize-test APPEND_STRING PROPERTY
COMPILE_FLAGS " --rocm-path=${ROCM_ROOT} --offload-arch=gfx936")
# COMPILE_FLAGS " --rocm-path=${ROCM_ROOT} --offload-arch=gfx936 -g -O1")
target_compile_definitions(resize-test PRIVATE
__HIP_PLATFORM_AMD__=1
THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_HIP
THRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP
)
\ No newline at end of file
# hipcc-thrust
# 简介
```
给出在DCU上使用thrust库的脚本和hipcc cmake编译脚本示例
```
# 编译执行
## hipcc 直接编译
- hipcc -std=c++14 -o resize-test resize-test.cpp
## cmake 使用hipcc 编译
```
bash build.sh
./build/resize-test
```
rm -rf build
mkdir build
cd build
cmake ..
make
# This is the CMakeCache file.
# For build in directory: /workspace/sunzhq/tmp/hipcc-thrust/build
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Path to a program.
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar
//Choose the type of build
CMAKE_BUILD_TYPE:STRING=Debug
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//LLVM archiver
CMAKE_CXX_COMPILER_AR:FILEPATH=/opt/dtk-25.04.3/dcc/bin/llvm-ar
//Generate index for LLVM archive
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=CMAKE_CXX_COMPILER_RANLIB-NOTFOUND
//Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O2 -DNDEBUG
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Path to a program.
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
//Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld
//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
//Flags used by the linker during the creation of modules during
// all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=resize_test
//Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
//Path to a program.
CMAKE_READELF:FILEPATH=/usr/bin/readelf
//Flags used by the linker during the creation of shared libraries
// during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Path to a program.
HIPCC_EXECUTABLE:FILEPATH=/opt/dtk-25.04.3/bin/hipcc
//ROCm installation directory
ROCM_ROOT:PATH=/opt/dtk-25.04.3
//Value Computed by CMake
resize_test_BINARY_DIR:STATIC=/workspace/sunzhq/tmp/hipcc-thrust/build
//Value Computed by CMake
resize_test_SOURCE_DIR:STATIC=/workspace/sunzhq/tmp/hipcc-thrust
########################
# INTERNAL cache entries
########################
//ADVANCED property for variable: CMAKE_ADDR2LINE
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/workspace/sunzhq/tmp/hipcc-thrust/build
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=16
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=5
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_DLLTOOL
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/workspace/sunzhq/tmp/hipcc-thrust
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_READELF
CMAKE_READELF-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/usr/bin/uname
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
set(CMAKE_CXX_COMPILER "/opt/dtk-25.04.3/bin/hipcc")
set(CMAKE_CXX_COMPILER_ARG1 "")
set(CMAKE_CXX_COMPILER_ID "Clang")
set(CMAKE_CXX_COMPILER_VERSION "17.0.0")
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
set(CMAKE_CXX_COMPILER_WRAPPER "")
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "11")
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20")
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
set(CMAKE_CXX_PLATFORM_ID "Linux")
set(CMAKE_CXX_SIMULATE_ID "")
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU")
set(CMAKE_CXX_SIMULATE_VERSION "")
set(CMAKE_AR "/usr/bin/ar")
set(CMAKE_CXX_COMPILER_AR "/opt/dtk-25.04.3/dcc/bin/llvm-ar")
set(CMAKE_RANLIB "/usr/bin/ranlib")
set(CMAKE_CXX_COMPILER_RANLIB "CMAKE_CXX_COMPILER_RANLIB-NOTFOUND")
set(CMAKE_LINKER "/usr/bin/ld")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCXX )
set(CMAKE_CXX_COMPILER_LOADED 1)
set(CMAKE_CXX_COMPILER_WORKS TRUE)
set(CMAKE_CXX_ABI_COMPILED TRUE)
set(CMAKE_COMPILER_IS_MINGW )
set(CMAKE_COMPILER_IS_CYGWIN )
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif()
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif()
set(CMAKE_CXX_COMPILER_ID_RUN 1)
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
foreach (lang C OBJC OBJCXX)
if (CMAKE_${lang}_COMPILER_ID_RUN)
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
endforeach()
endif()
endforeach()
set(CMAKE_CXX_LINKER_PREFERENCE 30)
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
# Save compiler ABI information.
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
set(CMAKE_CXX_COMPILER_ABI "ELF")
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
if(CMAKE_CXX_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_CXX_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
endif()
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
endif()
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/opt/dtk-25.04.3/llvm/lib/clang/17.0.0;/opt/dtk-25.04.3/llvm/lib/clang/17.0.0/include/cuda_wrappers;/opt/dtk-25.04.3/hsa/include;/opt/dtk-25.04.3/hip/include;/opt/dtk-25.04.3/dcc/gcvm/include;/opt/dtk-25.04.3/include;/opt/hyhal/include;/opt/dtk-25.04.3/llvm/include;/opt/dtk-25.04.3/opencl/include;/usr/include/c++/7.3.0;/usr/include/c++/7.3.0/x86_64-linux-gnu;/usr/include/c++/7.3.0/backward;/opt/dtk-25.04.3/dcc/lib/clang/17.0.0/include;/usr/local/include;/usr/include")
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "pthread;m;rt;amdhip64;clang_rt.builtins-x86_64;stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/opt/dtk-25.04.3/hip/lib;/opt/dtk-25.04.3/lib;/opt/dtk-25.04.3/llvm/lib/clang/17.0.0/lib/linux;/usr/lib/gcc/x86_64-linux-gnu/7.3.0;/usr/lib64;/lib/x86_64-linux-gnu;/lib64;/usr/lib/x86_64-linux-gnu;/lib;/usr/lib;/opt/dtk-25.04.3/opencl/lib")
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
set(CMAKE_HOST_SYSTEM "Linux-4.19.90-89.11.v2401.ky10.x86_64")
set(CMAKE_HOST_SYSTEM_NAME "Linux")
set(CMAKE_HOST_SYSTEM_VERSION "4.19.90-89.11.v2401.ky10.x86_64")
set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_SYSTEM "Linux-4.19.90-89.11.v2401.ky10.x86_64")
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_VERSION "4.19.90-89.11.v2401.ky10.x86_64")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_CROSSCOMPILING "FALSE")
set(CMAKE_SYSTEM_LOADED 1)
This diff is collapsed.
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.16
# Relative path conversion top directories.
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/workspace/sunzhq/tmp/hipcc-thrust")
set(CMAKE_RELATIVE_PATH_TOP_BINARY "/workspace/sunzhq/tmp/hipcc-thrust/build")
# Force unix paths in dependencies.
set(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
This diff is collapsed.
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.16
# The generator used is:
set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
"CMakeCache.txt"
"/usr/share/cmake/Modules/CMakeCXXCompiler.cmake.in"
"/usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp"
"/usr/share/cmake/Modules/CMakeCXXInformation.cmake"
"/usr/share/cmake/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
"/usr/share/cmake/Modules/CMakeCommonLanguageInclude.cmake"
"/usr/share/cmake/Modules/CMakeCompilerIdDetection.cmake"
"/usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake"
"/usr/share/cmake/Modules/CMakeDetermineCompileFeatures.cmake"
"/usr/share/cmake/Modules/CMakeDetermineCompiler.cmake"
"/usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake"
"/usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake"
"/usr/share/cmake/Modules/CMakeDetermineSystem.cmake"
"/usr/share/cmake/Modules/CMakeFindBinUtils.cmake"
"/usr/share/cmake/Modules/CMakeGenericSystem.cmake"
"/usr/share/cmake/Modules/CMakeInitializeConfigs.cmake"
"/usr/share/cmake/Modules/CMakeLanguageInformation.cmake"
"/usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake"
"/usr/share/cmake/Modules/CMakeParseImplicitLinkInfo.cmake"
"/usr/share/cmake/Modules/CMakeSystem.cmake.in"
"/usr/share/cmake/Modules/CMakeSystemSpecificInformation.cmake"
"/usr/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake"
"/usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake"
"/usr/share/cmake/Modules/CMakeTestCompilerCommon.cmake"
"/usr/share/cmake/Modules/CMakeUnixFindMake.cmake"
"/usr/share/cmake/Modules/Compiler/ADSP-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/Borland-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
"/usr/share/cmake/Modules/Compiler/Clang-CXX.cmake"
"/usr/share/cmake/Modules/Compiler/Clang-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
"/usr/share/cmake/Modules/Compiler/Clang-FindBinUtils.cmake"
"/usr/share/cmake/Modules/Compiler/Clang.cmake"
"/usr/share/cmake/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/Cray-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/GHS-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/GNU.cmake"
"/usr/share/cmake/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/IAR-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
"/usr/share/cmake/Modules/Compiler/Intel-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/MSVC-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/PGI-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/PathScale-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/SCO-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/TI-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/Watcom-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
"/usr/share/cmake/Modules/Internal/CMakeCheckCompilerFlag.cmake"
"/usr/share/cmake/Modules/Internal/FeatureTesting.cmake"
"/usr/share/cmake/Modules/Platform/Linux-Clang-CXX.cmake"
"/usr/share/cmake/Modules/Platform/Linux-Determine-CXX.cmake"
"/usr/share/cmake/Modules/Platform/Linux-GNU-CXX.cmake"
"/usr/share/cmake/Modules/Platform/Linux-GNU.cmake"
"/usr/share/cmake/Modules/Platform/Linux.cmake"
"/usr/share/cmake/Modules/Platform/UnixPaths.cmake"
"../CMakeLists.txt"
"CMakeFiles/3.16.5/CMakeCXXCompiler.cmake"
"CMakeFiles/3.16.5/CMakeSystem.cmake"
)
# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
"Makefile"
"CMakeFiles/cmake.check_cache"
)
# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
"CMakeFiles/3.16.5/CMakeSystem.cmake"
"CMakeFiles/3.16.5/CMakeCXXCompiler.cmake"
"CMakeFiles/3.16.5/CMakeCXXCompiler.cmake"
"CMakeFiles/CMakeDirectoryInformation.cmake"
)
# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
"CMakeFiles/resize-test.dir/DependInfo.cmake"
)
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.16
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /workspace/sunzhq/tmp/hipcc-thrust
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /workspace/sunzhq/tmp/hipcc-thrust/build
#=============================================================================
# Directory level rules for the build root directory
# The main recursive "all" target.
all: CMakeFiles/resize-test.dir/all
.PHONY : all
# The main recursive "preinstall" target.
preinstall:
.PHONY : preinstall
# The main recursive "clean" target.
clean: CMakeFiles/resize-test.dir/clean
.PHONY : clean
#=============================================================================
# Target rules for target CMakeFiles/resize-test.dir
# All Build rule for target.
CMakeFiles/resize-test.dir/all:
$(MAKE) -f CMakeFiles/resize-test.dir/build.make CMakeFiles/resize-test.dir/depend
$(MAKE) -f CMakeFiles/resize-test.dir/build.make CMakeFiles/resize-test.dir/build
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles --progress-num=1,2 "Built target resize-test"
.PHONY : CMakeFiles/resize-test.dir/all
# Build rule for subdir invocation for target.
CMakeFiles/resize-test.dir/rule: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles 2
$(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/resize-test.dir/all
$(CMAKE_COMMAND) -E cmake_progress_start /workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles 0
.PHONY : CMakeFiles/resize-test.dir/rule
# Convenience name for target.
resize-test: CMakeFiles/resize-test.dir/rule
.PHONY : resize-test
# clean rule for target.
CMakeFiles/resize-test.dir/clean:
$(MAKE) -f CMakeFiles/resize-test.dir/build.make CMakeFiles/resize-test.dir/clean
.PHONY : CMakeFiles/resize-test.dir/clean
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
/workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles/rebuild_cache.dir
/workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles/resize-test.dir
/workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles/edit_cache.dir
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
#IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">])
#IncludeRegexScan: ^.*$
#IncludeRegexComplain: ^$
#IncludeRegexTransform:
/workspace/sunzhq/tmp/hipcc-thrust/resize-test.cpp
hip/hip_runtime.h
-
thrust/device_vector.h
-
cstdint
-
iostream
-
thrust/host_vector.h
-
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
"CXX"
)
# The set of files for implicit dependencies of each language:
set(CMAKE_DEPENDS_CHECK_CXX
"/workspace/sunzhq/tmp/hipcc-thrust/resize-test.cpp" "/workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles/resize-test.dir/resize-test.cpp.o"
)
set(CMAKE_CXX_COMPILER_ID "Clang")
# Preprocessor definitions for this target.
set(CMAKE_TARGET_DEFINITIONS_CXX
"THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_HIP"
"THRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP"
"__HIP_PLATFORM_AMD__=1"
)
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
)
# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
)
# Fortran module output directory.
set(CMAKE_Fortran_TARGET_MODULE_DIR "")
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.16
# Delete rule output on recipe failure.
.DELETE_ON_ERROR:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /workspace/sunzhq/tmp/hipcc-thrust
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /workspace/sunzhq/tmp/hipcc-thrust/build
# Include any dependencies generated for this target.
include CMakeFiles/resize-test.dir/depend.make
# Include the progress variables for this target.
include CMakeFiles/resize-test.dir/progress.make
# Include the compile flags for this target's objects.
include CMakeFiles/resize-test.dir/flags.make
CMakeFiles/resize-test.dir/resize-test.cpp.o: CMakeFiles/resize-test.dir/flags.make
CMakeFiles/resize-test.dir/resize-test.cpp.o: ../resize-test.cpp
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/resize-test.dir/resize-test.cpp.o"
/opt/dtk-25.04.3/bin/hipcc $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/resize-test.dir/resize-test.cpp.o -c /workspace/sunzhq/tmp/hipcc-thrust/resize-test.cpp
CMakeFiles/resize-test.dir/resize-test.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/resize-test.dir/resize-test.cpp.i"
/opt/dtk-25.04.3/bin/hipcc $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /workspace/sunzhq/tmp/hipcc-thrust/resize-test.cpp > CMakeFiles/resize-test.dir/resize-test.cpp.i
CMakeFiles/resize-test.dir/resize-test.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/resize-test.dir/resize-test.cpp.s"
/opt/dtk-25.04.3/bin/hipcc $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /workspace/sunzhq/tmp/hipcc-thrust/resize-test.cpp -o CMakeFiles/resize-test.dir/resize-test.cpp.s
# Object files for target resize-test
resize__test_OBJECTS = \
"CMakeFiles/resize-test.dir/resize-test.cpp.o"
# External object files for target resize-test
resize__test_EXTERNAL_OBJECTS =
resize-test: CMakeFiles/resize-test.dir/resize-test.cpp.o
resize-test: CMakeFiles/resize-test.dir/build.make
resize-test: CMakeFiles/resize-test.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable resize-test"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/resize-test.dir/link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
CMakeFiles/resize-test.dir/build: resize-test
.PHONY : CMakeFiles/resize-test.dir/build
CMakeFiles/resize-test.dir/clean:
$(CMAKE_COMMAND) -P CMakeFiles/resize-test.dir/cmake_clean.cmake
.PHONY : CMakeFiles/resize-test.dir/clean
CMakeFiles/resize-test.dir/depend:
cd /workspace/sunzhq/tmp/hipcc-thrust/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /workspace/sunzhq/tmp/hipcc-thrust /workspace/sunzhq/tmp/hipcc-thrust /workspace/sunzhq/tmp/hipcc-thrust/build /workspace/sunzhq/tmp/hipcc-thrust/build /workspace/sunzhq/tmp/hipcc-thrust/build/CMakeFiles/resize-test.dir/DependInfo.cmake --color=$(COLOR)
.PHONY : CMakeFiles/resize-test.dir/depend
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