Archived
nemotron 3.5 implementation
This commit is contained in:
1 parent
33108e488b
commit
94c90b17ad
59 files changed
+6046
-76
No files matched your search
+53
-6
@@ -15,7 +15,7 @@
|
||||
# builder. With the archive linked, a new ABI call missing from the fake would pull in
|
||||
# rad_builder.cpp.o and collide on every rad_decl_* symbol; without it the error is a single
|
||||
# undefined reference.
|
||||
set(RAD_TESTS_NO_CORE arch_test glm5next_test)
|
||||
set(RAD_TESTS_NO_CORE arch_test glm5next_test nemotron35_test)
|
||||
|
||||
# fixture_test tests tools/kfixture.cpp and tools/opshapes.cpp (the seeded draw, the reduction and
|
||||
# the on-disk recording) directly, kbench_test tools/kbench_core.cpp (rad-kbench's rules), and
|
||||
@@ -165,6 +165,28 @@ foreach(t ${RAD_TESTS})
|
||||
get_filename_component(n ${t} NAME_WE)
|
||||
if(n IN_LIST RAD_TESTS_NO_CORE)
|
||||
add_executable(${n} ${t} ${CMAKE_SOURCE_DIR}/core/util/rad_util.cpp)
|
||||
if(n STREQUAL "nemotron35_test")
|
||||
target_sources(${n} PRIVATE ${CMAKE_SOURCE_DIR}/core/mm/processor.cpp
|
||||
${CMAKE_SOURCE_DIR}/core/mm/item.cpp
|
||||
${CMAKE_SOURCE_DIR}/core/mm/media.cpp
|
||||
${CMAKE_SOURCE_DIR}/core/server/nemotron35.cpp
|
||||
${CMAKE_SOURCE_DIR}/core/server/oai.cpp)
|
||||
# Exercise the actual request parser without pulling the unrelated core runtime into the
|
||||
# recording-builder test. Unused completion/response helpers are discarded at link time.
|
||||
target_compile_options(${n} PRIVATE -ffunction-sections -fdata-sections)
|
||||
target_link_options(${n} PRIVATE -Wl,--gc-sections)
|
||||
file(GLOB NEMOTRON_TEST_TOKENIZER CONFIGURE_DEPENDS
|
||||
${CMAKE_SOURCE_DIR}/core/text/tokenizer*.cpp ${CMAKE_SOURCE_DIR}/core/text/unicode_norm*.cpp)
|
||||
target_sources(${n} PRIVATE ${NEMOTRON_TEST_TOKENIZER})
|
||||
target_link_libraries(${n} PRIVATE rad_vendor_llama)
|
||||
target_link_libraries(${n} PRIVATE ${CMAKE_DL_LIBS})
|
||||
target_include_directories(${n} PRIVATE ${CMAKE_SOURCE_DIR}/vendor)
|
||||
add_dependencies(${n} libref)
|
||||
if(TARGET libavx)
|
||||
add_dependencies(${n} libavx)
|
||||
target_compile_definitions(${n} PRIVATE RAD_NEMOTRON_TEST_AVX=1)
|
||||
endif()
|
||||
endif()
|
||||
elseif(n IN_LIST RAD_TESTS_HARNESS)
|
||||
add_executable(${n} ${t})
|
||||
add_dependencies(${n} harness_fixture)
|
||||
@@ -296,7 +318,7 @@ endif()
|
||||
# the host backend; convert_test runs rad-convert on the same checkpoints. Both start the built
|
||||
# binaries as children, so they depend on them and on every plugin the checkpoints select
|
||||
# (llama_fp8 for convert_test's --set of an fp8 quantization_config).
|
||||
set(RAD_E2E_DEPS radiance rad-convert libref libquant qwen35_bf16 lfm2_bf16 gemma4 gemma4_bf16
|
||||
set(RAD_E2E_DEPS radiance rad-convert libref libquant nemotron35_embed qwen35_bf16 lfm2_bf16 gemma4 gemma4_bf16
|
||||
llama_dense_fp8 llama_fp8 qwenimage21)
|
||||
if(TARGET libavx)
|
||||
list(APPEND RAD_E2E_DEPS libavx)
|
||||
@@ -622,16 +644,18 @@ endif()
|
||||
# vocabulary and registration, and serve rad-kbench's fixture through the installed tools
|
||||
# (tests/oot_plugins.sh). libr4d is included when the tree built it, with the same HIP compiler,
|
||||
# targets and RAD_HIP_VOPD_REPEATABLE. Labelled `oot`: it rebuilds every plugin and takes minutes.
|
||||
set(RAD_OOT_HIP "")
|
||||
set(RAD_OOT_COMPILER "")
|
||||
set(RAD_OOT_TARGETS "")
|
||||
if(RAD_HIP_FOUND AND TARGET libr4d)
|
||||
get_target_property(RAD_OOT_R4D_ARCH libr4d HIP_ARCHITECTURES)
|
||||
string(REPLACE ";" "\\;" RAD_OOT_R4D_ARCH "${RAD_OOT_R4D_ARCH}")
|
||||
set(RAD_OOT_HIP ${CMAKE_HIP_COMPILER} "${RAD_OOT_R4D_ARCH}" ${RAD_HIP_VOPD_REPEATABLE})
|
||||
set(RAD_OOT_COMPILER "${CMAKE_HIP_COMPILER}")
|
||||
set(RAD_OOT_TARGETS "${RAD_OOT_R4D_ARCH}")
|
||||
endif()
|
||||
add_test(NAME oot_plugins
|
||||
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/oot_plugins.sh
|
||||
${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/oot ${RAD_OOT_HIP}
|
||||
${CMAKE_CXX_COMPILER})
|
||||
${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/oot "${RAD_OOT_COMPILER}" "${RAD_OOT_TARGETS}"
|
||||
"${RAD_HIP_VOPD_REPEATABLE}" "${CMAKE_CXX_COMPILER}")
|
||||
# RESOURCE_LOCK kbench_memory: its replay holds operands in host memory as the kbench entries do.
|
||||
set_tests_properties(oot_plugins PROPERTIES
|
||||
LABELS "oot"
|
||||
@@ -735,3 +759,26 @@ foreach(cost IN ITEMS kbench_ref:500 r4d_selftest:350 r4d_emu_attn_sweep:80 kben
|
||||
set_tests_properties(${t} PROPERTIES COST ${c})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Model-local device kernels are checked on the actual engine queue against libref.
|
||||
if(TARGET nemotron35_device_test)
|
||||
set_target_properties(nemotron35_device_test PROPERTIES ENABLE_EXPORTS ON)
|
||||
add_dependencies(nemotron35_device_test libref)
|
||||
if(TARGET libr4d)
|
||||
add_dependencies(nemotron35_device_test libr4d)
|
||||
add_test(NAME nemotron35_device_test_card COMMAND nemotron35_device_test)
|
||||
set_tests_properties(nemotron35_device_test_card PROPERTIES LABELS "gpu" RUN_SERIAL TRUE
|
||||
ENVIRONMENT "RADIANCE_HOME=${RAD_PLUGIN_OUT};RAD_TEST_CPU_BUDGET=0" TIMEOUT 180)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Large BF16 GEMMs require real device memory; ordinary host entries skip them.
|
||||
if(TARGET r4d_bf16_capacity_test)
|
||||
set_target_properties(r4d_bf16_capacity_test PROPERTIES ENABLE_EXPORTS ON)
|
||||
if(TARGET libr4d)
|
||||
add_dependencies(r4d_bf16_capacity_test libr4d)
|
||||
add_test(NAME r4d_bf16_capacity_test_card COMMAND r4d_bf16_capacity_test)
|
||||
set_tests_properties(r4d_bf16_capacity_test_card PROPERTIES LABELS "gpu" RUN_SERIAL TRUE
|
||||
ENVIRONMENT "RADIANCE_HOME=${RAD_PLUGIN_OUT};RAD_TEST_CPU_BUDGET=0" TIMEOUT 300)
|
||||
endif()
|
||||
endif()
|
||||
Reference in new issue
Block a user