Skip to content

Conversion by cu casts Float64 to Float32 but not Int64 to Int32 #1388

@CarloLucibello

Description

@CarloLucibello

Is there any particular reason for downcasting Float64 to Float32 but not Int64 to Int32? Should this be made more consistent?

julia> Float64[1, 2] |> cu
2-element CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}:
 1.0
 2.0

julia> Int64[1, 2] |> cu
2-element CuArray{Int64, 1, CUDA.Mem.DeviceBuffer}:
 1
 2

Sorry if this has been already asked, it's hard to search for this specific issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions