# Does Brian2CUDA work under Windows WSL

**URL:** <https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039>\
**Category:** Support\
**Tags:** brian2cuda, windows, cuda, wsl\
**Created:** [3 August 2023 10:51 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039 "2023-08-03T10:51:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivanni](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/sivanni/32/617_2.png) [@sivanni](https://brian.discourse.group/u/sivanni)\
**Post date:** [3 August 2023 10:51 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/1 "2023-08-03T10:51:24Z")

</div>

Hi,

I know Windows is not currently supported for brian2CUDA, but is there any known reason why it would not work under Ubuntu with Windows Subsystem for Linux (WSL)? Sorry for asking before testing.

yours,  
Simo

---

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [3 August 2023 22:36 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/2 "2023-08-03T22:36:08Z")

</div>

Hi Simo, I see no reason that it should not work if you follow [1. NVIDIA GPU Accelerated Computing on WSL 2 — wsl-user-guide 12.2 documentation](https://docs.nvidia.com/cuda/wsl-user-guide/index.html) to install CUDA, but I don’t think anyone has ever tried… Would be great if you could give it a spin and report back. If there are issues, I guess they’d be much easier to fix than adding full Windows support.

Best,  
Marcel

---

<div class="post-metadata">

**Author:** ![denisalevi](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/denisalevi/32/24_2.png) [@denisalevi](https://brian.discourse.group/u/denisalevi)\
**Post date:** [5 August 2023 17:09 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/3 "2023-08-05T17:09:04Z")

</div>

Hi Simo,

I don’t see a reason for why it shouldn’t work on Windows. I only didn’t implement it because I didn’t have a Windows machine at hand.

If you want to give it a go, that would be much appreciated. Here is the related issue: [Support Windows · Issue #225 · brian-team/brian2cuda · GitHub](https://github.com/brian-team/brian2cuda/issues/225)

You would have to implement the win\_makefile which compiles the generated code. And then there are probably a few things to fix in the GPU selection part in Windows (assuming that the commands to query GPUs might be slightly different).

I’m happy to assist if you give it a go.

Best,  
Denis

---

<div class="post-metadata">

**Author:** ![sivanni](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/sivanni/32/617_2.png) [@sivanni](https://brian.discourse.group/u/sivanni)\
**Post date:** [8 August 2023 06:46 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/4 "2023-08-08T06:46:16Z")

</div>

Thanks! Denis, do you think the win\_makefile is necessary for WSL? It should be a linux operating system under Windows.

best regards,  
Simo

---

<div class="post-metadata">

**Author:** ![denisalevi](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/denisalevi/32/24_2.png) [@denisalevi](https://brian.discourse.group/u/denisalevi)\
**Post date:** [24 September 2023 04:55 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/5 "2023-09-24T04:55:59Z")

</div>

Hi Simo,

sorry for the late reply, I missed your question.

If you are using Linux as WSL, you shouldn’t need the win\_makefile. I would assume compilation would work as expected under Linux. I just don’t know how GPU access is handled under WSL. But I would just give it a try. It might just work.

It would be great to hear if it works if you give it a try.

Best, Denis

---

<div class="post-metadata">

**Author:** ![sivanni](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/sivanni/32/617_2.png) [@sivanni](https://brian.discourse.group/u/sivanni)\
**Post date:** [5 October 2023 06:40 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/6 "2023-10-05T06:40:26Z")

</div>

Thanks Denis!  
I will give this a try when I start optimizing my current retina simulator code.  
CU,  
Simo

---

<div class="post-metadata">

**Author:** ![sivanni](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/sivanni/32/617_2.png) [@sivanni](https://brian.discourse.group/u/sivanni)\
**Post date:** [10 October 2024 10:57 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/7 "2024-10-10T10:57:00Z")

</div>

The brian2cuda runs in WSL2 under Windows 11 without any issues! Tests are passing, and code runs.

Thanks  
Simo

---

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [10 October 2024 11:25 UTC](https://brian.discourse.group/t/does-brian2cuda-work-under-windows-wsl/1039/8 "2024-10-10T11:25:44Z")

</div>

Many thanks for your feedback on this!
