Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Backend choice reset inside of threads #257

Open
@hexane360

Description

@hexane360

Inside a new thread, Arrayfire uses the default backend rather than the backend set by the parent thread:

>>>importarrayfireasaf>>>af.get_available_backends()('cpu','cuda','opencl')>>>af.get_active_backend()'cuda'>>>af.set_backend('opencl')>>>af.get_active_backend()'opencl'>>>fromthreadingimportThread>>>Thread(target=lambda:print(af.get_active_backend())).start()cuda

Is this expected behavior and/or documented anywhere? I would think that the active backend should be process local rather than thread local.

If it matters, here's my version info:
OS: Ubuntu 20.04
arrayfire: 3.9.0 (commit955152b6)
arrayfire-python: 3.8.10

cuda: 11.4.0-1
ocl-icd-libopencl1: 2.2.11-1
intel-mkl: 2020.0.166-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp