Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CUDA support relying on abandoned toolchain #52

Merged
merged 1 commit into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Unreleased
- The `cuda` feature has been removed, as the toolchain it depends on is long abandoned.

## Release v0.8.1 (04 Apr. 2023)
- Add implementation of `rkyv` serialization/deserialization to the `Wide*` wrapper types.

Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ partial_fixed_point_support = [ "fixed", "cordic" ]
serde_serialize = [ "serde", "fixed/serde" ]
rkyv-serialize = [ "rkyv" ]
libm = [ "num-traits/libm" ]
cuda = [ "cuda_std", "cust_core" ]

[dependencies]
num-traits = { version = "0.2.11", default-features = false }
Expand All @@ -37,8 +36,6 @@ rand = { version = "0.8", optional = true }
serde = { version = "1", default-features = false, optional = true }
rkyv = { version = "0.7", optional = true }
libm_force = { package = "libm", version = "0.2", optional = true }
cuda_std = { version = "0.2", optional = true }
cust_core = { version = "0.1", optional = true }

[package.metadata.docs.rs]
all-features = true
18 changes: 0 additions & 18 deletions src/scalar/complex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ use std::ops::Neg;
use std::{f32, f64};

use crate::scalar::{Field, RealField, SubsetOf, SupersetOf};
#[cfg(all(
any(target_arch = "nvptx", target_arch = "nvptx64"),
not(feature = "std"),
not(feature = "libm_force"),
feature = "cuda"
))]
use cuda_std::GpuFloat;
#[cfg(all(not(feature = "std"), not(feature = "libm_force"), feature = "libm"))]
use num::Float;
//#[cfg(feature = "decimal")]
Expand Down Expand Up @@ -493,17 +486,6 @@ impl_complex!(
f64,f64,f64
);

#[cfg(all(
any(target_arch = "nvptx", target_arch = "nvptx64"),
not(feature = "std"),
not(feature = "libm_force"),
feature = "cuda"
))]
impl_complex!(
f32, f32, GpuFloat;
f64, f64, GpuFloat
);

#[cfg(feature = "libm_force")]
impl ComplexField for f32 {
type RealField = f32;
Expand Down
17 changes: 0 additions & 17 deletions src/scalar/real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ use approx::{RelativeEq, UlpsEq};

use crate::scalar::ComplexField;

#[cfg(all(
any(target_arch = "nvptx", target_arch = "nvptx64"),
not(feature = "std"),
not(feature = "libm_force"),
feature = "cuda"
))]
use cuda_std::GpuFloat;
#[cfg(all(not(feature = "std"), not(feature = "libm_force"), feature = "libm"))]
use num::Float;
//#[cfg(feature = "decimal")]
Expand Down Expand Up @@ -225,16 +218,6 @@ macro_rules! impl_real(
impl_real!(f32, f32, Float, Float; f64, f64, Float, Float);
#[cfg(all(feature = "std", not(feature = "libm_force")))]
impl_real!(f32, f32, f32, f32; f64, f64, f64, f64);
#[cfg(all(
any(target_arch = "nvptx", target_arch = "nvptx64"),
not(feature = "std"),
not(feature = "libm_force"),
feature = "cuda"
))]
impl_real!(
f32, f32, GpuFloat, GpuFloat;
f64, f64, GpuFloat, GpuFloat
);
#[cfg(feature = "libm_force")]
impl_real!(f32, f32, libm_force_f32, libm_force_f32; f64, f64, libm_force, libm_force);

Expand Down
7 changes: 3 additions & 4 deletions src/simd/auto_simd_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ macro_rules! ident_to_value(
derive(rkyv::Archive, rkyv::Deserialize, rkyv::Serialize),
archive(as = "Self", bound(archive = "N: rkyv::Archive<Archived = N>"))
)]
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
pub struct AutoSimd<N>(pub N);

/// A SIMD boolean structure that implements all the relevant traits from `num` an `simba`.
Expand Down Expand Up @@ -669,7 +668,7 @@ macro_rules! impl_float_simd(

impl Field for AutoSimd<$t> {}

#[cfg(any(feature = "std", feature = "libm", feature = "libm_force", all(any(target_arch = "nvptx", target_arch = "nvptx64"), feature = "cuda")))]
#[cfg(any(feature = "std", feature = "libm", feature = "libm_force"))]
impl SimdRealField for AutoSimd<$t> {
#[inline(always)]
fn simd_atan2(self, other: Self) -> Self {
Expand Down Expand Up @@ -763,7 +762,7 @@ macro_rules! impl_float_simd(
}
}

#[cfg(any(feature = "std", feature = "libm", feature = "libm_force", all(any(target_arch = "nvptx", target_arch = "nvptx64"), feature = "cuda")))]
#[cfg(any(feature = "std", feature = "libm", feature = "libm_force"))]
impl SimdComplexField for AutoSimd<$t> {
type SimdRealField = Self;

Expand Down Expand Up @@ -1029,7 +1028,7 @@ macro_rules! impl_float_simd(
// NOTE: most of the impls in there are copy-paste from the implementation of
// ComplexField for num_complex::Complex. Unfortunately, we can't reuse the implementations
// so easily.
#[cfg(any(feature = "std", feature = "libm", feature = "libm_force", all(any(target_arch = "nvptx", target_arch = "nvptx64"), feature = "cuda")))]
#[cfg(any(feature = "std", feature = "libm", feature = "libm_force"))]
impl SimdComplexField for num_complex::Complex<AutoSimd<$t>> {
type SimdRealField = AutoSimd<$t>;

Expand Down