-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[headers] remove many installed files which should remain private, add more fixes for downstream projects #2952
Conversation
due to #2956 discussion, I just understood that it is not necessary to install all header files like it is done now. Since we want to reduce API exposure also with the CMake toolchain, we can just install |
Does this PR fixes some cases with OSx, build.sh, cuDNN, or something else? |
yes some very minor changes. But let me prepare another commit to undo changes in header path location before considering merge |
…also for non-msvc compilers
vcpkg CI integration on Linux is not really working. I have to debug what’s going on |
Then it will be ready for merging considerations |
Ok, just say when I can merge it. Also is it known issue with CUDA 10.1? #2971 |
hi! Yes this should be my next priority, before even working on the setup script. |
…ix variable not expanded for vcpkg
ok only one question remain unsolved for this PR (apart from the API expansion, which I strongly support but I'd prefer if you did it), please let me know your opinion so that I can apply it:
or
? The first looks shorter and easier, but if we want to expand headers from the two as of now ( |
We can use the second way
It is easy to do for C++ namespace dark {
...
} But it is much more difficult to do for C Also it affects on Python scripts, that are use C API. Also we should think about C# API https://github.com/AlexeyAB/darknet/blob/099b71d1de6b992ce8f9d7ff585c84efd0d4bf94/build/darknet/YoloWrapper.cs darknet/include/yolo_v2_class.hpp Lines 59 to 65 in 099b71d
which uses C++-API Lines 26 to 102 in 099b71d
|
What I meant with namespacing under quotes was just the But I also understand your point, about real namespacing, which is maybe necessary only for the C++ header. Because as you said it’s more difficult and for C it impacts also python. It deserves another PR for sure. When discussing the API surface expansion we can discuss the rework of the namespace and a revision of C/C++/C# |
a836369
to
21e6372
Compare
…igs, since it causes internal compiler errors. Waiting for updates from vcpkg
I still have some improvements to apply for downstream users of darknet library. Sorry for the delay, I had some problems |
@cenit Hi, Is this PR ready and I can merge it? I created several projects: https://github.com/AlexeyAB/darknet/projects |
Hi no sorry still not finished. I am very sorry, I am too much busy these days. Tomorrow I will finish it! edit: wonderful projects! Just had the time to read them, wow! Yes, that's exactly what I meant. In this way we can see better our way forwards! |
waiting for microsoft/vcpkg#6417 to be merged since it fixes vcpkg on macOS. Some tests also on my part, then it should be ready to merge |
Nice work! Will wait. |
microsoft/vcpkg#6417 is merged. And PR should be almost ready. I'd like to do some other tests, but I don't know if I have time today edit: I will read CI logs and check for regression later when it will be finished, since I changed some logics inside CMake |
I think it should be ready to let users test it. In case of problems I will help debug. |
Thanks a lot! Does it use by default two CCs: CC 3.0 + CC 7.0/7.5 selected based on CUDA-version? |
for now it just choose the best CC based on your gpu and your cuda version. On CI, where the detection fails because there's no GPU, it builds for ALL CCs 😄 it seems to work well! |
Sure, I will improve user interface in the next commit :) |
now there's a CUDA_ARCHITECTURES variable with some pre-set values:
@AlexeyAB Please let me know if you like this version more |
@cenit Hi, Thanks for multiple CCs! ) I think we can enable CUDNN_HALF even for CC >= 6.0: https://github.com/AlexeyAB/darknet/pull/2952/files#diff-af3b638bc2a3e6c650974192a53c7291R58
Does it detect CC based on GPU-card or on CUDA-version? May be it is better to use minimal CC3.0 + Auto(CC7.5) by default? It will solve issue for multiple different GPUs. I got for RTX 2070 and CUDA 10.0:
|
@AlexeyAB hi! ok for CC>6.0 to enable CUDNN_HALF. About the CC, it is completely delegated to CMake. In the new frameworks that we are exploiting CMake has this wonderful capability, which is getting better every version more. I'd leave Auto by default, not CC3.0+CC7.5, because that one is just one click away and I see it as a "more expert setting" than a plain automatic selection... but of course changing the default is very easy, just let me know. IMHO it is also less future-proof. Auto will work even in 5 years, 3.0+7.5 it will be "old"... so less mainteinance for you ;) |
Do you mean that if I have Tesla V100 |
Yes. It should, at least... |
Thanks for PR, I merged it! |
Hi! Line 56 in 2347913
you give it a parameter (CUDA_ARCHITECTURES) which is created as a drop-down list with some options but can always overridden by user and it returns a variable (CUDA_ARCH_FLAGS) which contains the list of the options to pass to the compilers to have all the CCs requested |
[headers] remove many installed files which should remain private, add more fixes for downstream projects
as per title.
Discussing about publishing the tool and live in peace with other libraries, I was informed that we export some header files that have the same name as other libraries. The best solution is to wrap them inside a darknet folder. Thanks to common usage of the tool which does not involve installing darknet system-wide, and thanks also to the power of CMake that can make this change invisible to the end user, this change should not impact anyone. In the meantime I also implemented some minor fixes for downstream projects using darknet through CMake