WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Update outdated workaround for cusparseSpMV #2854

@jakirkham

Description

@jakirkham

There is a note in the code that says const needed to be dropped when working with cusparseSpMV in CUDA 11

// y = alpha*A*x + beta*y
//(Note: removed const-ness of x, because CUDA 11 SpMV
// descriptor creation works with non-const, and const-casting
// down is dangerous)
//
virtual void mv(value_type alpha,
value_type* __restrict__ x,
value_type beta,
value_type* __restrict__ y,
sparse_mv_alg_t alg = sparse_mv_alg_t::SPARSE_MV_ALG1,
bool transpose = false,
bool symmetric = false) const

Looking at the CUDA 12 docs for cusparseSpMV, it appears everything is marked const

Given this could we now use const here and anywhere else using cusparseSpMV?

Note: This originally came up in issue ( #2741 ). However it is a bit more nuanced than the other cleanup items in that issue. So have broken it out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions