Giter Site home page Giter Site logo

Comments (3)

maartenarnst avatar maartenarnst commented on June 16, 2024

It seems these issues have already been solved in the current develop branch. (I had observed these issues when compiling kokkos-kernels as part of Trilinos).

It may be worth noting that the example on

-https://rocm.docs.amd.com/projects/rocSPARSE/en/latest/generic.html#_CPPv417rocsparse_spmv_ex16rocsparse_handle19rocsparse_operationPKvK21rocsparse_spmat_descrK21rocsparse_dnvec_descrPKvK21rocsparse_dnvec_descr18rocsparse_datatype18rocsparse_spmv_alg20rocsparse_spmv_stageP6size_tPv

goes through all three stages rocsparse_spsv_stage_buffer_size, rocsparse_spsv_stage_preprocess, rocsparse_spsv_stage_compute.

The current fix

  • #if KOKKOSSPARSE_IMPL_ROCM_VERSION >= 60000
    KOKKOS_ROCSPARSE_SAFE_CALL_IMPL(
    rocsparse_spmv(handle, myRocsparseOperation, &alpha, Aspmat, vecX, &beta,
    vecY, compute_type, alg, rocsparse_spmv_stage_buffer_size,
    &buffer_size, tmp_buffer));
    KOKKOS_IMPL_HIP_SAFE_CALL(hipMalloc(&tmp_buffer, buffer_size));
    KOKKOS_ROCSPARSE_SAFE_CALL_IMPL(
    rocsparse_spmv(handle, myRocsparseOperation, &alpha, Aspmat, vecX, &beta,
    vecY, compute_type, alg, rocsparse_spmv_stage_compute,
    &buffer_size, tmp_buffer));

omits the rocsparse_spmv_stage_preprocess stage. While this may be appropriate for the "stream" algorithm, it's not clear that omitting the preprocessing step is appropriate for the "default" algorithm.

Also not that I've just introduced PR #2100 to fix a minor issue with compiling when both rocsparse and mkl are enabled.

@seanofthemillers @lucbv

from kokkos-kernels.

seanofthemillers avatar seanofthemillers commented on June 16, 2024

On the Trilinos, these fixes are being incorporated in trilinos/Trilinos#12681 (holdover until a new KK snapshot goes in), though there are a couple other ROCm fixes going in that PR at the same time.

from kokkos-kernels.

ndellingwood avatar ndellingwood commented on June 16, 2024

The kokkos-kernels snapshot to Trilinos PR trilinos/Trilinos#12707 has merged as well as trilinos/Trilinos#12681 , thanks for the fixes @seanofthemillers !

from kokkos-kernels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.