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

oneDAL dbscan sample code exception #3002

Open
AlexZhao-becls opened this issue Dec 3, 2024 · 3 comments
Open

oneDAL dbscan sample code exception #3002

AlexZhao-becls opened this issue Dec 3, 2024 · 3 comments
Assignees

Comments

@AlexZhao-becls
Copy link

AlexZhao-becls commented Dec 3, 2024

oneDAL dbscan sample code exception

Build and run oneDAL/examples/oneapi/cpp/source/dbscan/dbscan_brute_force_batch.cpp.
Exception occurs when to call
const auto result_compute = dal::compute(q, dbscan_desc, x_data);

Debugger stops in Line 65 of compute_ops.hpp as below:

    template <typename Context>
    auto operator()(const Context& ctx, const Descriptor& desc, const input_t& input) const {
        check_preconditions(desc, input);
        const auto result =   // line 65
           compute_ops_dispatcher<Context, float_t, method_t, task_t>()(ctx, desc, input);
        check_postconditions(desc, input, result);
       return result;
    }

Exception thrown at 0x0000000000000000 in TestDBSCAN.exe: 0xC0000005: Access violation executing location 0x0000000000000000.

The sycl::queue q is built on CPU - Intel(R) OpenCL, 12th Gen Intel(R) Core(TM) i7-1260P
OS: Windows 10 Enterprise 22H2
oneAPI: 2025.0
Visual Studio 2022 64-bit Version 17.7.5

Try to remove the explicit "q" param as below:
const auto result_compute = dal::compute(dbscan_desc, x_data);
there is no exception.

@AlexZhao-becls AlexZhao-becls changed the title Exception occurs when to run the oneDAL/examples/oneapi/cpp/source/dbscan/dbscan_brute_force_batch.cpp oneDAL dbscan sample code exception Dec 3, 2024
@Alexandr-Solovev
Copy link
Contributor

Hi, @AlexZhao-becls !
Have you used modified version of the oneDAL/examples/oneapi/cpp/source/dbscan/dbscan_brute_force_batch.cpp file, because we dont use q in this example
https://github.com/uxlfoundation/oneDAL/blob/main/examples/oneapi/cpp/source/dbscan/dbscan_brute_force_batch.cpp#L27
If you want to use sycl::queue it makes to take a look on our dpc examples:
https://github.com/uxlfoundation/oneDAL/blob/main/examples/oneapi/dpc/source/dbscan/dbscan_brute_force_batch.cpp#L35

@AlexZhao-becls
Copy link
Author

AlexZhao-becls commented Dec 12, 2024

Hi, @Alexandr-Solovev,

Thanks for your response. I want to use sycl::queue in my investigation to evaluate the performance on different devices.
I tried the dpc example: https://github.com/uxlfoundation/oneDAL/blob/main/examples/oneapi/dpc/source/dbscan/dbscan_brute_force_batch.cpp#L35
And, the exception occurs on CPU as what I described in this issue. There is no exception for this example on second device of "Intel(R) Iris(R) Xe Graphics" on my machine.

@Alexandr-Solovev
Copy link
Contributor

@AlexZhao-becls You can launch dpc examples with host queue to check your performance on CPU. Can you share please result log of launching dpc examples? It should show results from both devices(cpu gpu).
examples/oneapi/cpp dont support queue and it uses only CPU version of the algorithm

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

No branches or pull requests

2 participants