Giter Site home page Giter Site logo

Comments (3)

ndellingwood avatar ndellingwood commented on September 24, 2024

This is the culprit region in the BatchedGemmHandle for the unit tests:

BatchedGemmHandle(int kernelAlgoType = BaseHeuristicAlgos::SQUARE,
int teamSize = 0, int vecLength = 0)
: BatchedKernelHandle(kernelAlgoType, teamSize, vecLength) {
#if defined(KOKKOSKERNELS_ENABLE_TPL_CUBLAS)
if (!_tplParamsSet && kernelAlgoType == GemmTplAlgos::CUBLAS) {
static cublasHandle_t cublas_handle;
_tplParamsSingleton.cublas_handle = &cublas_handle;
_tplParamsSet = true;
}
#endif // CUBLAS
#if defined(KOKKOSKERNELS_ENABLE_TPL_MAGMA)
if (!_tplParamsSet && kernelAlgoType == GemmTplAlgos::MAGMA) {
static magma_queue_t magma_queue;
_tplParamsSingleton.magma_queue = &magma_queue;
_tplParamsSet = true;
}
#endif // MAGMA
};
BatchedGemmHandle(bool tplParamsSet,
int kernelAlgoType = BaseHeuristicAlgos::SQUARE,
int teamSize = 0, int vecLength = 0)
: BatchedKernelHandle(kernelAlgoType, teamSize, vecLength) {
_tplParamsSet = tplParamsSet;
};
#if defined(KOKKOSKERNELS_ENABLE_TPL_CUBLAS)
BatchedGemmHandle(cublasHandle_t &cublas_handle,
int kernelAlgoType = BaseHeuristicAlgos::SQUARE,
int teamSize = 0, int vecLength = 0)
: BatchedGemmHandle(true, kernelAlgoType, teamSize, vecLength) {
_tplParamsSingleton.cublas_handle = &cublas_handle;
};
#endif // CUBLAS
#if defined(KOKKOSKERNELS_ENABLE_TPL_MAGMA)
BatchedGemmHandle(magma_queue_t &magma_queue,
int kernelAlgoType = BaseHeuristicAlgos::SQUARE,
int teamSize = 0, int vecLength = 0)
: BatchedGemmHandle(true, kernelAlgoType, teamSize, vecLength) {
_tplParamsSingleton.magma_queue = &magma_queue;
};
#endif // MAGMA
decltype(auto) get_tpl_params() {
#if _kernelAlgoType == CUBLAS && defined(KOKKOSKERNELS_ENABLE_TPL_CUBLAS)
return _tplParamsSingleton.cublas_handle;
#elif _kernelAlgoType == MAGMA && defined(KOKKOSKERNELS_ENABLE_TPL_MAGMA)
return _tplParamsSingleton.magma_queue;
#else
return this->BatchedKernelHandle::get_tpl_params();
#endif
}

from kokkos-kernels.

lucbv avatar lucbv commented on September 24, 2024

Thanks for catching this, we should go clean it up.
Setting up the build with MAGMA is going to be very helpful!

from kokkos-kernels.

ndellingwood avatar ndellingwood commented on September 24, 2024

Adding a note that #2181 has a temporary workaround in the unit test to allow compiling tests with both magma and cublas enabled. I think the BatchedGemmHandle will need some refactoring in order to remove the workaround

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.