Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement stream priority feature #321

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

dmenig
Copy link

@dmenig dmenig commented Nov 23, 2021

Solves #319

I'm not exactly sure my work is proper, I'm more a python guy than C++. Can you share your thoughts @inducer please ?

Copy link
Owner

@inducer inducer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, and sorry about the long delay in reviewing this.

Gitlab CI link: https://gitlab.tiker.net/inducer/pycuda/-/commit/c08a582c48d1b28e201adb0b2f5a1adec1f5eef6/pipelines?ref=issue_319

src/cpp/cuda.hpp Show resolved Hide resolved
src/cpp/cuda.hpp Show resolved Hide resolved
src/cpp/cuda.hpp Show resolved Hide resolved
@dmenig
Copy link
Author

dmenig commented Apr 26, 2022

Thanks for your contribution, and sorry about the long delay in reviewing this.

Gitlab CI link: https://gitlab.tiker.net/inducer/pycuda/-/commit/c08a582c48d1b28e201adb0b2f5a1adec1f5eef6/pipelines?ref=issue_319

Do you know how to solve this ?

        src/wrapper/wrap_cudadrv.cpp:1202:87: error: no matching function for call to ‘pycudaboost::python::init<unsigned int, int>::init(pycudaboost::python::arg&, pycudaboost::python::arg&)’
         1202 |       ("Stream", py::init<unsigned int, int>(py::arg("flags")=0, py::arg("priority")=0))

I tried removing the int arg and am waiting for the CI result but I'm doubtful that is the problem. I'm puzzled.

@inducer
Copy link
Owner

inducer commented Apr 26, 2022

I tried removing the int arg and am waiting for the CI result but I'm doubtful that is the problem. I'm puzzled.

Does it compile for you locally?

@inducer
Copy link
Owner

inducer commented Apr 26, 2022

Pushed to Gitlab for CI, find results via https://gitlab.tiker.net/inducer/pycuda/-/commits/issue_319

@inducer
Copy link
Owner

inducer commented Apr 26, 2022

(Pushed once again.)

@dmenig
Copy link
Author

dmenig commented Apr 26, 2022

I tried removing the int arg and am waiting for the CI result but I'm doubtful that is the problem. I'm puzzled.

Does it compile for you locally?

I didn't try to do that. I usually use my CI for back and forth. I'll see if I manage to do that.

@dmenig
Copy link
Author

dmenig commented Apr 26, 2022

I managed to repoduce the CI results on my machine. I think this larger message is interesting :

    src/wrapper/wrap_cudadrv.cpp:1202:87: error: no matching function for call to ‘pycudaboost::python::init<unsigned int, int>::init(pycudaboost::python::arg&, pycudaboost::python::arg&)’       1202 |       ("Stream", py::init<unsigned int, int>(py::arg("flags")=0, py::arg("priority")=0))                                                                                                    |                                                                                       ^                                                                                               In file included from bpl-subset/bpl_subset/boost/python/class.hpp:20,                                                                                                                                         from bpl-subset/bpl_subset/boost/python.hpp:18,                                                                                                                          
                     from src/cpp/cuda.hpp:36,                                                                                                                                                
                     from src/wrapper/wrap_cudadrv.cpp:3:                                      
    bpl-subset/bpl_subset/boost/python/init.hpp:253:5: note: candidate: ‘template<long unsigned int N> pycudaboost::python::init<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T
14>::init(const pycudaboost::python::detail::keywords<N>&, const char*)’                                                                                                                      
      253 |     init(detail::keywords<N> const& kw, char const* doc_ = 0)                      
          |     ^~~~                                                                                                                                                                          
    bpl-subset/bpl_subset/boost/python/init.hpp:253:5: note:   template argument deduction/substitution failed:                                                                               
    src/wrapper/wrap_cudadrv.cpp:1202:85: note:   cannot convert ‘pycudaboost::python::detail::keywords<1>(((const char*)"priority")).pycudaboost::python::detail::keywords<1>::operator=<int>
(0)’ (type ‘pycudaboost::python::arg’ {aka ‘pycudaboost::python::detail::keywords<1>’}) to type ‘const char*’
     1202 |       ("Stream", py::init<unsigned int, int>(py::arg("flags")=0, py::arg("priority")=0))
          |                                                                      ~~~~~~~~~~~~~~~^~
    In file included from bpl-subset/bpl_subset/boost/python/class.hpp:20,
                     from bpl-subset/bpl_subset/boost/python.hpp:18,
                     from src/cpp/cuda.hpp:36,
                     from src/wrapper/wrap_cudadrv.cpp:3:
    bpl-subset/bpl_subset/boost/python/init.hpp:244:5: note: candidate: ‘template<long unsigned int N> pycudaboost::python::init<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T
14>::init(const char*, const pycudaboost::python::detail::keywords<N>&)’
      244 |     init(char const* doc_, detail::keywords<N> const& kw)
          |     ^~~~
    bpl-subset/bpl_subset/boost/python/init.hpp:244:5: note:   template argument deduction/substitution failed:

Looks like I can't supply two keywords with default value to this function, but I can't figure out why. Come to think of it : none of the other functions have two arguments with default values in this repo. Can you tell me how to solve this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants