Skip to content

Gaps in supported Python features in CUDA Python #155

Closed
@1e-to

Description

@1e-to

Evaluate if Supported Python features in CUDA Python are currently supported for numba-dppy.

Constructs (in CUDA not supported)

  • Exception handling (try .. except, try .. finally)
  • Context management (the with statement)
  • Comprehensions (either list, dict, set or generator comprehensions)
  • Generator (any yield statements)

Constructs (in CUDA supported) In DPPY not supported, not error but not any effect

  • The raise statement
  • The assert statement

Built-in types

  • int
  • float
  • complex
  • bool
  • None
  • tuple

Built-in functions

  • abs()
  • bool
  • complex
  • enumerate()
  • float
  • int
  • len()
  • min()
  • max()
  • range (only ints/uints)
  • round()
  • zip()

Standard library modules

  • cmath.acos()
  • cmath.acosh()
  • cmath.asin()
  • cmath.asinh()
  • cmath.atan()
  • cmath.atanh()
  • cmath.cos()
  • cmath.cosh()
  • cmath.exp()
  • cmath.isfinite()
  • cmath.isinf()
  • cmath.isnan()
  • cmath.log()
  • cmath.log10()
  • cmath.phase()
  • cmath.polar()
  • cmath.rect()
  • cmath.sin()
  • cmath.sinh()
  • cmath.sqrt()
  • cmath.tan()
  • cmath.tanh()

Math

  • math.acos()
  • math.asin()
  • math.atan()
  • math.acosh()
  • math.asinh()
  • math.atanh()
  • math.cos()
  • math.sin()
  • math.tan()
  • math.hypot()
  • math.cosh()
  • math.sinh()
  • math.tanh()
  • math.atan2()
  • math.erf()
  • math.erfc()
  • math.exp()
  • math.expm1()
  • math.fabs()
  • math.gamma()
  • math.lgamma()
  • math.log()
  • math.log10()
  • math.log1p()
  • math.sqrt()
  • math.pow()
  • math.ceil()
  • math.floor()
  • math.copysign()
  • math.fmod()
  • math.modf()
  • math.isnan()
  • math.isinf()

Operator

  • operator.add() (+)
  • operator.and_() (&)
  • operator.eq() (==)
  • operator.floordiv() (//)
  • operator.ge() (>=)
  • operator.gt() (>)
  • operator.iadd() (+=)
  • operator.iand() (&=)
  • operator.ifloordiv() (//=)
  • operator.ilshift() (<<=)
  • operator.imod() (%=)
  • operator.imul() (*=)
  • operator.invert() (~=)
  • operator.ior() (|=)
  • operator.ipow() (**=)
  • operator.irshift() (>>=)
  • operator.isub() (-=)
  • operator.itruediv() (/=)
  • operator.ixor() (^=)
  • operator.le() (<=)
  • operator.lshift() (<<)
  • operator.lt() (<)
  • operator.mod() (%)
  • operator.mul() (*)
  • operator.ne() (!=)
  • operator.neg() (- x)
  • operator.not_() (not x)
  • operator.or_() (or)
  • operator.pos() (+ x)
  • operator.pow() (**)
  • operator.rshift() (>>)
  • operator.sub() (-)
  • operator.truediv() (/)
  • operator.xor() (^)

Numpy support (Support in CUDA)

  • accessing ndarray attributes .shape, .strides, .ndim, .size, etc..
  • scalar ufuncs that have equivalents in the math module; i.e. np.sin(x[0]), where x is a 1D array.
  • indexing and slicing works.

Numpy support (Not Support in CUDA)

  • array creation APIs.
  • array methods.
  • functions that returns a new array.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions