Skip to content

[BUG] Rust compiler optimizations crashes arrayfire #299

Closed

Description

@BA8F0D39

Description

Similar to bug #73 , rust compiler optimizations create instability the program and will result in a crash

Setting compiler optimizations to the highest level

[profile.release]
opt-level = 3

and building a rust program in release mode

cargo build --release

crashes my program and GPU drivers.
Hilariously, my screen turned blank and I didn't get to see the error message.

Activity

  1. 9prady9 commented on May 31, 2021

    @9prady9
    Member

    Can you also please update the description with details like OS, ArrayFire(installed library) version, ArrayFire crate version, Backend being used, GPU driver version.

    To get some clarification, just compiling cargo build --release is causing the crash or running the program built with opt-level=3 is causing the crash ?

  2. self-assigned this
    on May 31, 2021
  3. BA8F0D39 commented on Oct 5, 2021

    @BA8F0D39
    ContributorAuthor

    It seems jemalloc isn't compatible with arrayfire

    #[global_allocator]
    static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

  4. 9prady9 commented on Oct 6, 2021

    @9prady9
    Member

    @BA8F0D39 I assume, you are referring to the CPU backend because it should not be a problem for CUDA/OpenCL except in few minor set of APIs where host side allocations take place for strings etc.

    I haven't used jemalloc, so I would have to try it and check where the incompatibility stems from. Is it the upstream lib or something in rust crate. I suspect it could be upstream lib but cannot be certain about it yet.

  5. 9prady9 commented on Dec 23, 2021

    @9prady9
    Member

    Sorry, couldn't get back to this. Will try this weekend.

  6. added this to the 3.8.1 milestone on Dec 23, 2021
  7. 9prady9 commented on Feb 19, 2022

    @9prady9
    Member

    can you please tell how do I reproduce this on my end ? perhaps your stand alone code from your project that uses jemalloc.

    Just the opt-level(3) and --release flag definitely aren't the problem as you have already pointed that out and I was able to run examples with those settings. Graphics examples are not working on my current system, but I don't think these are related.

  8. 9prady9 commented on May 9, 2022

    @9prady9
    Member

    Closing due to inactivity @BA8F0D39 feel free to re-open if you still have the issue reported or more info to share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions