Project

General

Profile

Packaging Request #3268 » remove-cuda-optix-metal.patch

Zuss, 2022-05-05 06:13 AM

View differences:

blender.new/intern/cycles/cmake/macros.cmake 2022-04-30 10:34:06.021115498 +0100
123 123
    ${PLATFORM_LINKLIBS}
124 124
  )
125 125

  
126
  if(WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX)
127
    if(WITH_CUDA_DYNLOAD)
128
      target_link_libraries(${target} extern_cuew)
129
    else()
130
      target_link_libraries(${target} ${CUDA_CUDA_LIBRARY})
131
    endif()
132
  endif()
126
  #if(WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX)
127
  #  if(WITH_CUDA_DYNLOAD)
128
  #    target_link_libraries(${target} extern_cuew)
129
  #  else()
130
  #    target_link_libraries(${target} ${CUDA_CUDA_LIBRARY})
131
  #  endif()
132
  #endif()
133 133

  
134 134
  if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
135 135
    target_link_libraries(${target} extern_hipew)
blender.new/intern/cycles/device/CMakeLists.txt 2022-04-30 12:06:47.791063426 +0100
22 22
  ../../../extern/clew/include
23 23
)
24 24

  
25
if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA)
26
  if(WITH_CUDA_DYNLOAD)
27
    list(APPEND INC
28
      ../../../extern/cuew/include
29
    )
30
    add_definitions(-DWITH_CUDA_DYNLOAD)
31
  else()
32
    list(APPEND INC_SYS
33
      ${CUDA_TOOLKIT_INCLUDE}
34
    )
35
    add_definitions(-DCYCLES_CUDA_NVCC_EXECUTABLE="${CUDA_NVCC_EXECUTABLE}")
36
  endif()
37
endif()
38

  
39 25
if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
40 26
  list(APPEND INC
41 27
    ../../../extern/hipew/include
......
64 50
  cpu/kernel_thread_globals.h
65 51
)
66 52

  
67
set(SRC_CUDA
68
  cuda/device.cpp
69
  cuda/device.h
70
  cuda/device_impl.cpp
71
  cuda/device_impl.h
72
  cuda/graphics_interop.cpp
73
  cuda/graphics_interop.h
74
  cuda/kernel.cpp
75
  cuda/kernel.h
76
  cuda/queue.cpp
77
  cuda/queue.h
78
  cuda/util.cpp
79
  cuda/util.h
80
)
81

  
82 53
set(SRC_HIP
83 54
  hip/device.cpp
84 55
  hip/device.h
......
104 75
  multi/device.h
105 76
)
106 77

  
107
set(SRC_METAL
108
  metal/bvh.mm
109
  metal/bvh.h
110
  metal/device.mm
111
  metal/device.h
112
  metal/device_impl.mm
113
  metal/device_impl.h
114
  metal/kernel.mm
115
  metal/kernel.h
116
  metal/queue.mm
117
  metal/queue.h
118
  metal/util.mm
119
  metal/util.h
120
)
121

  
122
set(SRC_OPTIX
123
  optix/device.cpp
124
  optix/device.h
125
  optix/device_impl.cpp
126
  optix/device_impl.h
127
  optix/queue.cpp
128
  optix/queue.h
129
  optix/util.h
130
)
131 78

  
132 79
set(SRC_HEADERS
133 80
  device.h
......
141 88
set(SRC
142 89
  ${SRC_BASE}
143 90
  ${SRC_CPU}
144
  ${SRC_CUDA}
145 91
  ${SRC_HIP}
146 92
  ${SRC_DUMMY}
147 93
  ${SRC_MULTI}
148
  ${SRC_OPTIX}
149 94
  ${SRC_HEADERS}
150
)
95
)  
151 96

  
152 97
set(LIB
153 98
  cycles_kernel
......
155 100
  ${CYCLES_GL_LIBRARIES}
156 101
)
157 102

  
158
if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA)
159
  if(WITH_CUDA_DYNLOAD)
160
    list(APPEND LIB
161
      extern_cuew
162
    )
163
  else()
164
    list(APPEND LIB
165
      ${CUDA_CUDA_LIBRARY}
166
    )
167
  endif()
168
endif()
169

  
170 103
if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
171 104
  list(APPEND LIB
172 105
    extern_hipew
......
175 108

  
176 109
add_definitions(${GL_DEFINITIONS})
177 110

  
178
if(WITH_CYCLES_DEVICE_CUDA)
179
  add_definitions(-DWITH_CUDA)
180
endif()
181 111
if(WITH_CYCLES_DEVICE_HIP)
182 112
  add_definitions(-DWITH_HIP)
183 113
endif()
184
if(WITH_CYCLES_DEVICE_OPTIX)
185
  add_definitions(-DWITH_OPTIX)
186
endif()
187
if(WITH_CYCLES_DEVICE_METAL)
188
  list(APPEND LIB
189
    ${METAL_LIBRARY}
190
  )
191
  add_definitions(-DWITH_METAL)
192
  list(APPEND SRC
193
    ${SRC_METAL}
194
  )
195
endif()
196 114

  
197 115
if(WITH_OPENIMAGEDENOISE)
198 116
  list(APPEND LIB
......
206 124
cycles_add_library(cycles_device "${LIB}" ${SRC})
207 125

  
208 126
source_group("cpu" FILES ${SRC_CPU})
209
source_group("cuda" FILES ${SRC_CUDA})
210 127
source_group("dummy" FILES ${SRC_DUMMY})
211 128
source_group("multi" FILES ${SRC_MULTI})
212
source_group("metal" FILES ${SRC_METAL})
213
source_group("optix" FILES ${SRC_OPTIX})
214 129
source_group("common" FILES ${SRC} ${SRC_HEADERS})
blender.new/intern/cycles/device/device.cpp 2022-04-30 12:07:02.051063293 +0100
24 24

  
25 25
#include "device/cpu/device.h"
26 26
#include "device/cpu/kernel.h"
27
#include "device/cuda/device.h"
28 27
#include "device/dummy/device.h"
29 28
#include "device/hip/device.h"
30
#include "device/metal/device.h"
31 29
#include "device/multi/device.h"
32
#include "device/optix/device.h"
33 30

  
34 31
#include "util/foreach.h"
35 32
#include "util/half.h"
blender.new/intern/cycles/kernel/CMakeLists.txt 2022-04-30 12:07:35.201062982 +0100
31 31
  device/cpu/kernel_avx2.cpp
32 32
)
33 33

  
34
set(SRC_KERNEL_DEVICE_CUDA
35
  device/cuda/kernel.cu
36
)
37

  
38 34
set(SRC_KERNEL_DEVICE_HIP
39 35
  device/hip/kernel.cpp
40 36
)
41 37

  
42
set(SRC_KERNEL_DEVICE_METAL
43
  device/metal/kernel.metal
44
)
45

  
46
set(SRC_KERNEL_DEVICE_OPTIX
47
  device/optix/kernel.cu
48
  device/optix/kernel_shader_raytrace.cu
49
)
50

  
51 38
set(SRC_KERNEL_DEVICE_CPU_HEADERS
52 39
  device/cpu/compat.h
53 40
  device/cpu/image.h
......
66 53
  device/gpu/work_stealing.h
67 54
)
68 55

  
69
set(SRC_KERNEL_DEVICE_CUDA_HEADERS
70
  device/cuda/compat.h
71
  device/cuda/config.h
72
  device/cuda/globals.h
73
)
74

  
75 56
set(SRC_KERNEL_DEVICE_HIP_HEADERS
76 57
  device/hip/compat.h
77 58
  device/hip/config.h
78 59
  device/hip/globals.h
79 60
)
80 61

  
81
set(SRC_KERNEL_DEVICE_OPTIX_HEADERS
82
  device/optix/compat.h
83
  device/optix/globals.h
84
)
85

  
86
set(SRC_KERNEL_DEVICE_METAL_HEADERS
87
  device/metal/compat.h
88
  device/metal/context_begin.h
89
  device/metal/context_end.h
90
  device/metal/globals.h
91
)
92

  
93 62
set(SRC_KERNEL_CLOSURE_HEADERS
94 63
  closure/alloc.h
95 64
  closure/bsdf.h
......
354 323

  
355 324
)
356 325

  
357
# CUDA module
358

  
359
if(WITH_CYCLES_CUDA_BINARIES)
360
  # 64 bit only
361
  set(CUDA_BITS 64)
362

  
363
  # CUDA version
364
  execute_process(COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT)
365
  string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${NVCC_OUT}")
366
  string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${NVCC_OUT}")
367
  set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
368

  
369
  # warn for other versions
370
  if((CUDA_VERSION MATCHES "101") OR
371
     (CUDA_VERSION MATCHES "102") OR
372
     (CUDA_VERSION MATCHES "111") OR
373
     (CUDA_VERSION MATCHES "112") OR
374
     (CUDA_VERSION MATCHES "113") OR
375
     (CUDA_VERSION MATCHES "114"))
376
  else()
377
    message(WARNING
378
      "CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
379
      "build may succeed but only CUDA 10.1 to 11.4 are officially supported")
380
  endif()
381

  
382
  # build for each arch
383
  set(cuda_sources device/cuda/kernel.cu
384
    ${SRC_KERNEL_HEADERS}
385
    ${SRC_KERNEL_DEVICE_GPU_HEADERS}
386
    ${SRC_KERNEL_DEVICE_CUDA_HEADERS}
387
    ${SRC_UTIL_HEADERS}
388
  )
389
  set(cuda_cubins)
390

  
391
  macro(CYCLES_CUDA_KERNEL_ADD arch prev_arch name flags sources experimental)
392
    if(${arch} MATCHES "compute_.*")
393
      set(format "ptx")
394
    else()
395
      set(format "cubin")
396
    endif()
397
    set(cuda_file ${name}_${arch}.${format})
398

  
399
    set(kernel_sources ${sources})
400
    if(NOT ${prev_arch} STREQUAL "none")
401
      if(${prev_arch} MATCHES "compute_.*")
402
        set(kernel_sources ${kernel_sources} ${name}_${prev_arch}.ptx)
403
      else()
404
        set(kernel_sources ${kernel_sources} ${name}_${prev_arch}.cubin)
405
      endif()
406
    endif()
407

  
408
    set(cuda_kernel_src "/device/cuda/${name}.cu")
409

  
410
    set(cuda_flags ${flags}
411
      -D CCL_NAMESPACE_BEGIN=
412
      -D CCL_NAMESPACE_END=
413
      -D NVCC
414
      -m ${CUDA_BITS}
415
      -I ${CMAKE_CURRENT_SOURCE_DIR}/..
416
      -I ${CMAKE_CURRENT_SOURCE_DIR}/device/cuda
417
      --use_fast_math
418
      -o ${CMAKE_CURRENT_BINARY_DIR}/${cuda_file}
419
      -Wno-deprecated-gpu-targets)
420

  
421
    if(WITH_NANOVDB)
422
      set(cuda_flags ${cuda_flags}
423
        -D WITH_NANOVDB
424
        -I "${NANOVDB_INCLUDE_DIR}")
425
    endif()
426

  
427
    if(WITH_CYCLES_DEBUG)
428
      set(cuda_flags ${cuda_flags} -D WITH_CYCLES_DEBUG)
429
    endif()
430

  
431
    if(WITH_CYCLES_CUBIN_COMPILER)
432
      string(SUBSTRING ${arch} 3 -1 CUDA_ARCH)
433

  
434
      # Needed to find libnvrtc-builtins.so. Can't do it from inside
435
      # cycles_cubin_cc since the env variable is read before main()
436
      if(APPLE)
437
        set(CUBIN_CC_ENV ${CMAKE_COMMAND}
438
          -E env DYLD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib")
439
      elseif(UNIX)
440
        set(CUBIN_CC_ENV ${CMAKE_COMMAND}
441
          -E env LD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib64")
442
      endif()
443

  
444
      add_custom_command(
445
        OUTPUT ${cuda_file}
446
        COMMAND ${CUBIN_CC_ENV}
447
            "$<TARGET_FILE:cycles_cubin_cc>"
448
            -target ${CUDA_ARCH}
449
            -i ${CMAKE_CURRENT_SOURCE_DIR}${cuda_kernel_src}
450
            ${cuda_flags}
451
            -v
452
            -cuda-toolkit-dir "${cuda_toolkit_root_dir}"
453
        DEPENDS ${kernel_sources} cycles_cubin_cc)
454
    else()
455
      set(_cuda_nvcc_args
456
            -arch=${arch}
457
            ${CUDA_NVCC_FLAGS}
458
            --${format}
459
            ${CMAKE_CURRENT_SOURCE_DIR}${cuda_kernel_src}
460
            --ptxas-options="-v"
461
            ${cuda_flags})
462

  
463
      if(WITH_COMPILER_CCACHE AND CCACHE_PROGRAM)
464
        add_custom_command(
465
          OUTPUT ${cuda_file}
466
          COMMAND ${CCACHE_PROGRAM} ${cuda_nvcc_executable} ${_cuda_nvcc_args}
467
          DEPENDS ${kernel_sources})
468
      else()
469
        add_custom_command(
470
          OUTPUT ${cuda_file}
471
          COMMAND ${cuda_nvcc_executable} ${_cuda_nvcc_args}
472
          DEPENDS ${kernel_sources})
473
      endif()
474

  
475
      unset(_cuda_nvcc_args)
476
    endif()
477
    delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${cuda_file}" ${CYCLES_INSTALL_PATH}/lib)
478
    list(APPEND cuda_cubins ${cuda_file})
479

  
480
    unset(cuda_debug_flags)
481
  endmacro()
482

  
483
  set(prev_arch "none")
484
  foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
485
    if(${arch} MATCHES ".*_2.")
486
      message(STATUS "CUDA binaries for ${arch} are no longer supported, skipped.")
487
    elseif(${arch} MATCHES ".*_30")
488
      if(DEFINED CUDA10_NVCC_EXECUTABLE)
489
        set(cuda_nvcc_executable ${CUDA10_NVCC_EXECUTABLE})
490
        set(cuda_toolkit_root_dir ${CUDA10_TOOLKIT_ROOT_DIR})
491
      elseif(${CUDA_VERSION} LESS 110) # Support for sm_30 was removed in CUDA 11
492
        set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
493
        set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
494
      else()
495
        message(STATUS "CUDA binaries for ${arch} require CUDA 10 or earlier, skipped.")
496
      endif()
497
    elseif(${arch} MATCHES ".*_7." AND ${CUDA_VERSION} LESS 100)
498
      message(STATUS "CUDA binaries for ${arch} require CUDA 10.0+, skipped.")
499
    elseif(${arch} MATCHES ".*_8.")
500
      if(DEFINED CUDA11_NVCC_EXECUTABLE)
501
        set(cuda_nvcc_executable ${CUDA11_NVCC_EXECUTABLE})
502
        set(cuda_toolkit_root_dir ${CUDA11_TOOLKIT_ROOT_DIR})
503
      elseif(${CUDA_VERSION} GREATER_EQUAL 111) # Support for sm_86 was introduced in CUDA 11
504
        set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
505
        set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
506
      else()
507
        message(STATUS "CUDA binaries for ${arch} require CUDA 11.1+, skipped.")
508
      endif()
509
    else()
510
      set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
511
      set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
512
    endif()
513
    if(DEFINED cuda_nvcc_executable AND DEFINED cuda_toolkit_root_dir)
514
      # Compile regular kernel
515
      CYCLES_CUDA_KERNEL_ADD(${arch} ${prev_arch} kernel "" "${cuda_sources}" FALSE)
516

  
517
      if(WITH_CYCLES_CUDA_BUILD_SERIAL)
518
        set(prev_arch ${arch})
519
      endif()
520

  
521
      unset(cuda_nvcc_executable)
522
      unset(cuda_toolkit_root_dir)
523
    endif()
524
  endforeach()
525

  
526
  add_custom_target(cycles_kernel_cuda ALL DEPENDS ${cuda_cubins})
527
  cycles_set_solution_folder(cycles_kernel_cuda)
528
endif()
529

  
530 326
####################################################### START
531 327

  
532 328
# HIP module
......
604 400
endif()
605 401

  
606 402
####################################################### END
607
# OptiX PTX modules
608

  
609
if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES)
610
  macro(CYCLES_OPTIX_KERNEL_ADD name input flags)
611
    set(output "${CMAKE_CURRENT_BINARY_DIR}/${name}.ptx")
612

  
613
    set(cuda_flags ${flags}
614
      -I "${OPTIX_INCLUDE_DIR}"
615
      -I "${CMAKE_CURRENT_SOURCE_DIR}/.."
616
      -I "${CMAKE_CURRENT_SOURCE_DIR}/device/cuda"
617
      --use_fast_math
618
      -Wno-deprecated-gpu-targets
619
      -o ${output})
620

  
621
    if(WITH_NANOVDB)
622
      set(cuda_flags ${cuda_flags}
623
        -D WITH_NANOVDB
624
        -I "${NANOVDB_INCLUDE_DIR}")
625
    endif()
626

  
627
    if(WITH_CYCLES_DEBUG)
628
      set(cuda_flags ${cuda_flags} -D WITH_CYCLES_DEBUG)
629
    endif()
630

  
631
    if(WITH_CYCLES_CUBIN_COMPILER)
632
      # Needed to find libnvrtc-builtins.so. Can't do it from inside
633
      # cycles_cubin_cc since the env variable is read before main()
634
      if(APPLE)
635
        set(CUBIN_CC_ENV ${CMAKE_COMMAND}
636
          -E env DYLD_LIBRARY_PATH="${CUDA_TOOLKIT_ROOT_DIR}/lib")
637
      elseif(UNIX)
638
        set(CUBIN_CC_ENV ${CMAKE_COMMAND}
639
          -E env LD_LIBRARY_PATH="${CUDA_TOOLKIT_ROOT_DIR}/lib64")
640
      endif()
641

  
642
      add_custom_command(
643
        OUTPUT ${output}
644
        DEPENDS
645
          ${input}
646
          ${SRC_KERNEL_HEADERS}
647
          ${SRC_KERNEL_DEVICE_GPU_HEADERS}
648
          ${SRC_KERNEL_DEVICE_CUDA_HEADERS}
649
          ${SRC_KERNEL_DEVICE_OPTIX_HEADERS}
650
          ${SRC_UTIL_HEADERS}
651
        COMMAND ${CUBIN_CC_ENV}
652
            "$<TARGET_FILE:cycles_cubin_cc>"
653
            -target 50
654
            -ptx
655
            -i ${CMAKE_CURRENT_SOURCE_DIR}/${input}
656
            ${cuda_flags}
657
            -v
658
            -cuda-toolkit-dir "${CUDA_TOOLKIT_ROOT_DIR}"
659
        DEPENDS ${kernel_sources} cycles_cubin_cc)
660
    else()
661
      add_custom_command(
662
        OUTPUT
663
          ${output}
664
        DEPENDS
665
          ${input}
666
          ${SRC_KERNEL_HEADERS}
667
          ${SRC_KERNEL_DEVICE_GPU_HEADERS}
668
          ${SRC_KERNEL_DEVICE_CUDA_HEADERS}
669
          ${SRC_KERNEL_DEVICE_OPTIX_HEADERS}
670
          ${SRC_UTIL_HEADERS}
671
        COMMAND
672
          ${CUDA_NVCC_EXECUTABLE}
673
          --ptx
674
          -arch=sm_50
675
          ${cuda_flags}
676
          ${input}
677
        WORKING_DIRECTORY
678
          "${CMAKE_CURRENT_SOURCE_DIR}")
679
    endif()
680
    list(APPEND optix_ptx ${output})
681

  
682
    delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${output}" ${CYCLES_INSTALL_PATH}/lib)
683
  endmacro()
684

  
685
  CYCLES_OPTIX_KERNEL_ADD(
686
    kernel_optix
687
    "device/optix/kernel.cu"
688
    "")
689
  CYCLES_OPTIX_KERNEL_ADD(
690
    kernel_optix_shader_raytrace
691
    "device/optix/kernel_shader_raytrace.cu"
692
    "--keep-device-functions")
693

  
694
  add_custom_target(cycles_kernel_optix ALL DEPENDS ${optix_ptx})
695
  cycles_set_solution_folder(cycles_kernel_optix)
696
endif()
697 403

  
698 404
# OSL module
699 405

  
......
741 447

  
742 448
cycles_add_library(cycles_kernel "${LIB}"
743 449
  ${SRC_KERNEL_DEVICE_CPU}
744
  ${SRC_KERNEL_DEVICE_CUDA}
745 450
  ${SRC_KERNEL_DEVICE_HIP}
746
  ${SRC_KERNEL_DEVICE_OPTIX}
747
  ${SRC_KERNEL_DEVICE_METAL}
748 451
  ${SRC_KERNEL_HEADERS}
749 452
  ${SRC_KERNEL_DEVICE_CPU_HEADERS}
750 453
  ${SRC_KERNEL_DEVICE_GPU_HEADERS}
751
  ${SRC_KERNEL_DEVICE_CUDA_HEADERS}
752 454
  ${SRC_KERNEL_DEVICE_HIP_HEADERS}
753
  ${SRC_KERNEL_DEVICE_OPTIX_HEADERS}
754
  ${SRC_KERNEL_DEVICE_METAL_HEADERS}
755 455
)
756 456

  
757 457
source_group("bake" FILES ${SRC_KERNEL_BAKE_HEADERS})
......
759 459
source_group("camera" FILES ${SRC_KERNEL_CAMERA_HEADERS})
760 460
source_group("closure" FILES ${SRC_KERNEL_CLOSURE_HEADERS})
761 461
source_group("device\\cpu" FILES ${SRC_KERNEL_DEVICE_CPU} ${SRC_KERNEL_DEVICE_CPU_HEADERS})
762
source_group("device\\cuda" FILES ${SRC_KERNEL_DEVICE_CUDA} ${SRC_KERNEL_DEVICE_CUDA_HEADERS})
763 462
source_group("device\\gpu" FILES ${SRC_KERNEL_DEVICE_GPU_HEADERS})
764 463
source_group("device\\hip" FILES ${SRC_KERNEL_DEVICE_HIP} ${SRC_KERNEL_DEVICE_HIP_HEADERS})
765
source_group("device\\optix" FILES ${SRC_KERNEL_DEVICE_OPTIX} ${SRC_KERNEL_DEVICE_OPTIX_HEADERS})
766
source_group("device\\metal" FILES ${SRC_KERNEL_DEVICE_METAL} ${SRC_KERNEL_DEVICE_METAL_HEADERS})
767 464
source_group("film" FILES ${SRC_KERNEL_FILM_HEADERS})
768 465
source_group("geom" FILES ${SRC_KERNEL_GEOM_HEADERS})
769 466
source_group("integrator" FILES ${SRC_KERNEL_INTEGRATOR_HEADERS})
......
773 470
source_group("svm" FILES ${SRC_KERNEL_SVM_HEADERS})
774 471
source_group("util" FILES ${SRC_KERNEL_UTIL_HEADERS})
775 472

  
776
if(WITH_CYCLES_CUDA)
777
  add_dependencies(cycles_kernel cycles_kernel_cuda)
778
endif()
779
if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES)
780
  add_dependencies(cycles_kernel cycles_kernel_optix)
781
endif()
782 473
if(WITH_CYCLES_HIP)
783 474
  add_dependencies(cycles_kernel cycles_kernel_hip)
784 475
endif()
......
789 480
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_BVH_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/bvh)
790 481
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_CAMERA_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/camera)
791 482
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_CLOSURE_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/closure)
792
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_CUDA}" ${CYCLES_INSTALL_PATH}/source/kernel/device/cuda)
793
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_CUDA_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/device/cuda)
794 483
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_GPU_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/device/gpu)
795 484
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_HIP}" ${CYCLES_INSTALL_PATH}/source/kernel/device/hip)
796 485
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_HIP_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/device/hip)
797
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_OPTIX}" ${CYCLES_INSTALL_PATH}/source/kernel/device/optix)
798
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_OPTIX_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/device/optix)
799
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_METAL}" ${CYCLES_INSTALL_PATH}/source/kernel/device/metal)
800
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_DEVICE_METAL_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/device/metal)
801 486
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_FILM_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/film)
802 487
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_GEOM_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/geom)
803 488
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNEL_INTEGRATOR_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/integrator)
(2-2/4)