Skip to content

Implement stream priority feature#321

Open
dmenig wants to merge 4 commits into
inducer:mainfrom
dmenig:issue_319
Open

Implement stream priority feature#321
dmenig wants to merge 4 commits into
inducer:mainfrom
dmenig:issue_319

Conversation

@dmenig

@dmenig dmenig commented Nov 23, 2021

Copy link
Copy Markdown

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 ?

@inducer inducer left a comment

Copy link
Copy Markdown
Owner

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

Comment thread src/cpp/cuda.hpp
Comment thread src/cpp/cuda.hpp
Comment thread src/cpp/cuda.hpp
@dmenig

dmenig commented Apr 26, 2022

Copy link
Copy Markdown
Author

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

inducer commented Apr 26, 2022

Copy link
Copy Markdown
Owner

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

inducer commented Apr 26, 2022

Copy link
Copy Markdown
Owner

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

@inducer

inducer commented Apr 26, 2022

Copy link
Copy Markdown
Owner

(Pushed once again.)

@dmenig

dmenig commented Apr 26, 2022

Copy link
Copy Markdown
Author

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

dmenig commented Apr 26, 2022

Copy link
Copy Markdown
Author

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