# How to write generic simulations with KernelAbstractions

**URL:** <https://discourse.julialang.org/t/how-to-write-generic-simulations-with-kernelabstractions/114963>\
**Category:** General Usage\
**Tags:** kernelabstractions\
**Created:** [May 30, 2024, 11:09am UTC](https://discourse.julialang.org/t/how-to-write-generic-simulations-with-kernelabstractions/114963 "2024-05-30T11:09:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Post date:** [May 30, 2024, 11:09am UTC](https://discourse.julialang.org/t/how-to-write-generic-simulations-with-kernelabstractions/114963/1 "2024-05-30T11:09:30Z")

</div>

I’m working on a project that should work with CUDA.jl and Metal.jl at the same time. Basically some simulation scripts, so, the `user` is me or collaborators running code (not somebody installing a package I make).

With KernelAbstractions.jl most of the heavy lifting is already done, but I am not sure what the best practice is to organize the `Project.toml`.

Should I have two folders which their own `Project.toml` and some basic definitions for the respective enviroments?

```julia
\ (project root)
... \src (common files)
... \cuda (CUDA specific part)
     ... \Project.toml 
... \metal (MetalAPI specific part)
    ... Project.toml 

```

It seems slightly cumbersome to maintain two or more project envs a the same time…
