1. 설치 방법
1.1. CUDA toolkit 설치
https://developer.nvidia.com/cuda-toolkit
CUDA Toolkit - Free Tools and Training
Get access to SDKs, trainings, and connect with developers.
developer.nvidia.com
- 설치 확인
'nvcc --version' 명령어를 통해 Cuda 설치 확인 가능

1.2. Vulkan SDK 설치
https://www.lunarg.com/vulkan-sdk/
Vulkan® SDK - What's in the SDK - Where to Download
Our Work with the Khronos Group LunarG has a long-standing partnership with the Khronos Group, a technology consortium that works to develop advanced, royalty-free, acceleration standards for 3D graphics. LunarG is also actively involved in influencing the
www.lunarg.com
- 설치 확인
설치 후 'D:\VulkanSDK\1.3.296.0\Bin\vkcube.exe' 실행 (개별적으로 설치된 폴더 확인)

1.3. Optical Flow SDK 5.0 Build
- 설치 경로
https://developer.nvidia.com/optical-flow-sdk
- CMake
활용 방법
1) NvFSBasicSamples 폴더내에 build 폴더 생성
2) CMake 실행 후 Source Code와 Build 경로 설정
3) Configure 실행
- 초기 상태

3.1) 변수 설정 확인
1. 'CUDA_SDK_ROOT_DIR' 수정
- CUDA가 설치된 경로로 수정

2. 'CMAKE_INSTALL_PREFIX' 제거
- 전역적으로 활용할 수 있도록 설치할 목적이 아니므로, Prefix 제거
https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html

3.2) CMake 최종 설정

3.3) 결과

4) NvOFSamples.sln 활용 build
4.1) solution 실행 후 Build

이때, UTF-8로 설정된 소스코드로 인해 오류 발생
- 코드 인코딩 방식

- 오류 메시지

4.2) UTF-8 Encoding으로 인한 오류 해결
모든 솔루션의 Property 수정 적용 (Command Line에 /utf-8 옵션 추가)


4.3) nvcc 오류 발생

- 오류 메시지 1. nvcc warning : Support for offline compilation for architectures prior to '_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
- 분석
추후 _75 미만의 아키텍쳐의 지원이 중단될 수 있다는 이야기이며, 현재 활용중인 RTX2070의 경우 7.5로 현재 동작 간 무관한 로그


https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#compute-capabilities
1. Introduction — CUDA C++ Programming Guide
Texture memory is read from kernels using the device functions described in Texture Functions. The process of reading a texture calling one of these functions is called a texture fetch. Each texture fetch specifies a parameter called a texture object for t
docs.nvidia.com
- 오류 메시지 2. nvcc fatal : Could not open output file F:/OneDrive/Kyun/01_PROJECT/26_DirectX12/DirectX12/Libraries/Include/DirectX/Optical_Flow_SDK_5.0.7/NvOFBasicSamples/build/AppStereoDisparityCuda/CMakeFiles/AppStereoDisparityCuda.dir/__/__/Common/Utils/AppStereoDisparityCuda_generated_kernel.cu.obj.NVCC-depend
- 분석
현재 AppStereoDisparityCuda_generated_kernel.cu.obj.NVCC-depend 파일이 존재하지 않아 문제가 발생했으며, 해당 파일을 CMake 간 생성해야 함

음... 일단은 다른 설치 진행 후 해당 부분 문제 해결할 예정
- 해결 방법
1) CMake 간 'CUDA_USE_STATIC_CUDA_RUNTIME' 명령어 추가

2) 파일 경로 단축
경로를 더 짧게 수정한 후 컴파일 시 정상 동작 확인 완료
2. TODO
1. Optical Flow 방식 보간 구현
- 하드웨어 연산을 활용하여 최적화를 구현하기 위해 Nvidia SDK 활용 방식 적용 중
2. Motion Vector 방식 보간 구현
- 발열등의 이유로 하드웨어 자원 활용을 줄여야 하는 경우, 매 프레임 간 동일한 연산 대신 간략화된 연산 적용
3. Frame Interpolation 방식 보간 구현
- 1 Frame의 마진을 적용해 중간 프레임 생성
4. AI 활용 보간 구현
- CNN 커널을 활용해 이미지 생성 구현
3. 참고자료
https://developer.nvidia.com/optical-flow-sdk
https://docs.nvidia.com/vpi/sample_stereo.html
https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#compute-capabilities
https://www.lunarg.com/vulkan-sdk/
https://developer.nvidia.com/cuda-toolkit
https://docs.nvidia.com/video-technologies/optical-flow-sdk/pdf/NVOFA_Programming_Guide.pdf
https://docs.nvidia.com/video-technologies/optical-flow-sdk/nvofa-programming-guide/index.html
'---------개인공부-------- > |DirectX (C++)|' 카테고리의 다른 글
[DirectX12] Instancing 구현 (0) | 2025.02.10 |
---|---|
[DirectX12] Geometry Shader 응용 (0) | 2025.01.25 |
[DirectX12] Imgui Render Target 출력 (0) | 2025.01.22 |
[DirectX] Imgui Texture Image 출력 (0) | 2025.01.21 |
[DirectX] 3D 엔진 개발 현황 (0) | 2025.01.20 |