Skip to content

Commit

Permalink
Fixes #702: Removed gratuitous space for the --no-source-include NV…
Browse files Browse the repository at this point in the history
…RTC compilation option
  • Loading branch information
eyalroz committed Jan 3, 2025
1 parent a2fbeeb commit e34e2d4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
9 changes: 8 additions & 1 deletion doxygen.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Doxyfile 1.10.0
# Doxyfile

# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
Expand Down Expand Up @@ -592,6 +592,13 @@ HIDE_UNDOC_MEMBERS = NO

HIDE_UNDOC_CLASSES = NO

# If the HIDE_UNDOC_NAMESPACES tag is set to \c YES, Doxygen will hide all
# undocumented namespaces that are normally visible in the namespace hierarchy.
# If set to NO, these namespaces will be included in the various overviews.
# This option has no effect if \ref cfg_extract_all "EXTRACT_ALL" is enabled.

HIDE_UNDOC_NAMESPACES = NO

# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# declarations. If set to NO, these declarations will be included in the
# documentation.
Expand Down
15 changes: 15 additions & 0 deletions src/cuda/api/multi_wrapper_impls/kernel_launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,21 @@ inline void validate_block_dimension_compatibility(
}
}

inline void validate_dyanmic_shared_memory_size(
const kernel_t& kernel,
memory::shared::size_t dynamic_shared_memory_size)
{
memory::shared::size_t max_dyn_shmem = kernel.get_attribute(
kernel::attribute_t::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES);
if (dynamic_shared_memory_size > max_dyn_shmem) {
throw ::std::invalid_argument(
"specified size of dynamic shared memory, " + ::std::to_string(dynamic_shared_memory_size)
+ "bytes, exceeds the maximum supported by " + kernel::detail_::identify(kernel)
+ ", " + ::std::to_string(max_dyn_shmem) + " bytes");
}
}


template<typename... KernelParameters>
void enqueue_launch_helper<kernel::apriori_compiled_t, KernelParameters...>::operator()(
const kernel::apriori_compiled_t& wrapped_kernel,
Expand Down
1 change: 1 addition & 0 deletions src/cuda/api/multi_wrapper_impls/launch_configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ inline void validate_compatibility(
{
validate(launch_config);
validate_block_dimension_compatibility(kernel, launch_config.dimensions.block);
validate_dyanmic_shared_memory_size(kernel, launch_config.dynamic_shared_memory_size);
// Uncomment if we actually get such checks
// validate_grid_dimension_compatibility(kernel, launch_config.dimensions.grid);
validate_compatibility(kernel.device(), launch_config);
Expand Down
2 changes: 1 addition & 1 deletion src/cuda/rtc/compilation_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ struct gadget<rtc::compilation_options_t<cuda_cpp>, MarshalTarget, Delimiter> {
if (opts.syntax_check_only) { marshalled << opt_start << "--fdevice-syntax-only"; }
if (opts.less_builtins) { marshalled << opt_start << "--minimal"; }
if (not opts.builtin_initializer_list) { marshalled << opt_start << "--builtin-initializer-list=false"; }
if (not opts.source_dirs_in_include_path) { marshalled << opt_start << "--no-source-include "; }
if (not opts.source_dirs_in_include_path) { marshalled << opt_start << "--no-source-include"; }
if (opts.extra_device_vectorization) { marshalled << opt_start << "--extra-device-vectorization"; }
if (opts.disable_warnings) { marshalled << opt_start << "--disable-warnings"; }
if (opts.assume_restrict) { marshalled << opt_start << "--restrict"; }
Expand Down

0 comments on commit e34e2d4

Please sign in to comment.