Comments (7)
Performance note, tou can (and should) remove the
-fno-vectorize -fno-unroll-loops
when using ClangEnzyme.Regardless investigating.
Please update the guide https://enzyme.mit.edu/getting_started/CUDAGuide/.
from enzyme.
Indeed and in progress, see EnzymeAD/www#14
from enzyme.
Performance note, tou can (and should) remove the -fno-vectorize -fno-unroll-loops
when using ClangEnzyme.
Regardless investigating.
from enzyme.
This does appear to be a memory error. Specifically because it thinks your input and output could overlap, it is caching each variable -- taking gigabytes per thread -- and thus clearly oom'ing.
Marking the two function inputs as restrict removes the caching, but something weird is still going on.
from enzyme.
This does appear to be a memory error. Specifically because it thinks your input and output could overlap, it is caching each variable -- taking gigabytes per thread -- and thus clearly oom'ing.
I also suspect there could be OOM, so I checked the execution with cuda-memcheck, and found nothing. (And just to confirm, I think Enzyme would also check for failed cuda memory allocation, right?) So I think there could be other errors happen even before the OOM. For example, if you are using 32-bit integers, the address or size can overflow for a gigabyte-sized buffer.
from enzyme.
Enzyme will assume allocation functions will succeed or assert (which apparently is not the case here). I'm guessing what could be happening is that the allocation itself crashes the kernel before any load/stores and perhaps cuda-memcheck doesn't check that?
But perhaps looking at an error code after the kernel launch could?
from enzyme.
Of course it is the best practice to check the error code after each kernel launch. You can check invalid kernel launch arguments by calling cudaGetLastError
after the kernel launches, and check runtime error inside the kernel by checking the error code returned from a following synchronization call. In my practice, both are needed.
But AFAIK, cuda-memcheck not only checks each load/store, but also checks the error code from each kernel launch or CUDA API call.
from enzyme.
Related Issues (20)
- Asan reports `stack-use-after-scope` HOT 8
- Does multisource work? HOT 17
- ninja: build stopped: subcommand failed. HOT 1
- Adding an advanced option flag with Enzyme CMake HOT 2
- Support LLVM 17 HOT 1
- Dose Auto Diff CUDA Kernel available now?
- Segmentation fault on Kalman example HOT 2
- Performed illegal update analysis on Kalman example HOT 11
- Correctness Issue 1 with Kalman Filter HOT 1
- Correctness Issue 2 with Kalman Filter (with DGEMM warning) HOT 1
- Error when differentiating Explicit template class HOT 5
- DiffUse Bug
- The llvm::Type::getInt8PtrTy API is removed in LLVM. HOT 1
- "caching potentially capturing/offset of allocation" crash
- Can not handle `@llvm.maximum.f32(float %38, float %39)` HOT 4
- `Cannot deduce adding type of: i32` when function is defined in seperate include file HOT 7
- Enzyme mutates enzyme_const array when optimization flag -O1 or further used
- cannot handle unknown binary operator: %5 = sub nsw i64 1597463007, %4 HOT 5
- Compilation error, "Cannot deduce type of copy" / -enzyme-print-activity HOT 4
- Support for x86_fp80 (long double) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enzyme.