Skip to content

[FEA]: Add a viewas function for type casting without modifying data #86

@ZhangZhiPku

Description

@ZhangZhiPku

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request?

Critical (currently preventing usage)

Please provide a clear description of problem this feature solves

A function like ct.viewas(x, dtype=int32), convert x to int32 without changing underlying data.

Feature Description

I am writing a function to compute the global maximum, but I found that the ct.atomic_max method only supports int32. So I tried to directly treat fp32 data as int32, however, I cannot find any function that can cast an fp32 tile to int32 without modifying the underlying data.

Describe your ideal solution

A function like ct.viewas(x, dtype=int32), convert x to int32 without changing underlying data.

Describe any alternatives you have considered

No response

Additional context

No response

Contributing Guidelines

  • I agree to follow cuTile Python's contributing guidelines
  • I have searched the open feature requests and have found no duplicates for this feature request

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions