Skip to content

Freestanding part 1#7743

Closed
gevtushenko wants to merge 2 commits intoNVIDIA:mainfrom
gevtushenko:freestanding-pt1
Closed

Freestanding part 1#7743
gevtushenko wants to merge 2 commits intoNVIDIA:mainfrom
gevtushenko:freestanding-pt1

Conversation

@gevtushenko
Copy link
Copy Markdown
Collaborator

Description

contributes towards https://github.com/NVIDIA/cccl_private/issues/622

We decided to split #7735 into multiple PRs. This one is the first PR that just introduces new macro and provide trivial changes.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@gevtushenko gevtushenko requested review from a team as code owners February 24, 2026 00:52
@gevtushenko gevtushenko requested a review from griwes February 24, 2026 00:52
@github-project-automation github-project-automation bot moved this to Todo in CCCL Feb 24, 2026
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Feb 24, 2026
@github-actions

This comment has been minimized.

Comment thread cub/cub/detail/delay_constructor.cuh Outdated
Comment thread cub/cub/detail/rfa.cuh
#include <cuda/std/__type_traits/is_same.h>
#include <cuda/std/array>
#include <cuda/std/climits>
#ifndef _CUB_DISABLE_CMATH
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we wanted to drop that?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to drop _CCCL one. This is _CUB version that only disables reproducible reduction, which is needed to guard against includes of cmath parts that do not work in freestanding at the moment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the ask was to split the PR into small chunks that can be individually reviewed I am 90% sure that we can actually just use the cmath code fine with any reasonably modern compiler, so please lets move this PR to only the ostream changes as discussed and open a followup for the other parts

Comment thread cub/cub/device/dispatch/tuning/tuning_radix_sort.cuh Outdated
Comment thread cub/cub/device/dispatch/tuning/tuning_reduce.cuh Outdated
Comment thread cub/cub/device/dispatch/tuning/tuning_segmented_reduce.cuh Outdated
Comment thread cub/cub/util_allocator.cuh Outdated
Comment thread cub/cub/util_allocator.cuh Outdated
Comment thread cub/cub/util_device.cuh
Comment on lines +274 to +285
template <typename Tag>
_CCCL_HOST inline PerDeviceAttributeCache& GetPerDeviceAttributeCache()
{
static PerDeviceAttributeCache cache;
return cache;
}

struct PtxVersionCacheTag
{};
struct SmVersionCacheTag
{};

Copy link
Copy Markdown
Contributor

@miscco miscco Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Is there a need for the code to be moved?

Comment thread thrust/thrust/system/cuda/detail/util.h Outdated
Comment thread thrust/thrust/system/cuda/detail/util.h Outdated
@github-project-automation github-project-automation bot moved this from In Review to In Progress in CCCL Feb 24, 2026

#include <cub/agent/agent_reduce.cuh>
#include <cub/detail/rfa.cuh>
#ifndef _CUB_DISABLE_CMATH
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto drop

@github-actions
Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 52m: Pass: 100%/349 | Total: 4d 19h | Max: 1h 11m | Hits: 99%/477209

See results here.

Comment thread libcudacxx/include/cuda/std/__cccl/host_std_lib.h
@gevtushenko
Copy link
Copy Markdown
Collaborator Author

This turns into too much work for people to agree on for MVP. Will keep the changes in my fork and ask others to help productize it once MVP is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants