From 9cd016b368ef6a1c37b24b6c782d0726e39c04fe Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 6 Sep 2016 10:48:12 +0100 Subject: [PATCH 1/4] Temporary file runner.cubin is now deleted, rather than put in the temp dir, fixing file name conflict error in issue brian-team/brian2genn#27. --- lib/src/generateALL.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/src/generateALL.cc b/lib/src/generateALL.cc index c3aa8cf68f..216eaf483d 100644 --- a/lib/src/generateALL.cc +++ b/lib/src/generateALL.cc @@ -225,13 +225,13 @@ void chooseDevice(NNmodel &model, //!< the nn model we are generating code for #ifdef _WIN32 nvccFlags += " -I\"%GENN_PATH%\\lib\\include\""; string runnerPath = path + "\\" + model.name + "_CODE\\runner.cc"; - string cubinPath = tS(getenv("TEMP")) + "\\runner.cubin"; + string cubinPath = path + "\\runner.cubin"; string nvccCommand = "\"\"" + tS(NVCC) + "\" " + nvccFlags; nvccCommand += " -o \"" + cubinPath + "\" \"" + runnerPath + "\"\""; #else nvccFlags += " -I\"$GENN_PATH/lib/include\""; string runnerPath = path + "/" + model.name + "_CODE/runner.cc"; - string cubinPath = "/tmp/runner.cubin"; + string cubinPath = path + "/runner.cubin"; string nvccCommand = "\"" + tS(NVCC) + "\" " + nvccFlags; nvccCommand += " -o \"" + cubinPath + "\" \"" + runnerPath + "\""; #endif @@ -269,6 +269,11 @@ void chooseDevice(NNmodel &model, //!< the nn model we are generating code for } } CHECK_CU_ERRORS(cuModuleUnload(module)); + + if (remove(cubinPath.c_str())) { + cerr << "generateALL: Error deleting dry-run cubin file" << endl; + exit(EXIT_FAILURE); + } } for (int kernel= 0; kernel < krnlNo; kernel++) { From 1474786496b8ad7d11afc355e31541fcd54c865c Mon Sep 17 00:00:00 2001 From: Thomas Nowotny Date: Thu, 10 Nov 2016 14:13:02 +0000 Subject: [PATCH 2/4] Added the user defined nvcc flags also to the dry run command to avoid any discrepancies between block size choices and final requirements on block size. --- lib/src/generateALL.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/generateALL.cc b/lib/src/generateALL.cc index cfa0473f89..98af177857 100644 --- a/lib/src/generateALL.cc +++ b/lib/src/generateALL.cc @@ -218,6 +218,7 @@ void chooseDevice(NNmodel &model, //!< the nn model we are generating code for string nvccFlags = "-cubin -x cu -arch sm_"; nvccFlags += tS(deviceProp[theDevice].major) + tS(deviceProp[theDevice].minor); + nvccFlags += " " + GENN_PREFERENCES::userNvccFlags; if (GENN_PREFERENCES::optimizeCode) nvccFlags += " -O3 -use_fast_math"; if (GENN_PREFERENCES::debugCode) nvccFlags += " -O0 -g -G"; if (GENN_PREFERENCES::showPtxInfo) nvccFlags += " -Xptxas \"-v\""; From 69e9d28a1efbc2be2faaf3a4e3e046017b9c28e1 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 14 Nov 2016 17:20:19 +0000 Subject: [PATCH 3/4] makefile_common_win.mk now appends to INCLUDE_FLAGS and LINK_FLAGS, rather than overwriting them, solving #110. --- userproject/include/makefile_common_win.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/userproject/include/makefile_common_win.mk b/userproject/include/makefile_common_win.mk index b6bef56c0b..44439beef3 100644 --- a/userproject/include/makefile_common_win.mk +++ b/userproject/include/makefile_common_win.mk @@ -40,15 +40,15 @@ CXXFLAGS =$(CXXFLAGS) $(OPTIMIZATIONFLAGS) # Global include and link flags !IFNDEF CPU_ONLY -INCLUDE_FLAGS =/I"$(GENN_PATH)\lib\include" /I"$(GENN_PATH)\userproject\include" /I"$(CUDA_PATH)\include" +INCLUDE_FLAGS =$(INCLUDE_FLAGS) /I"$(GENN_PATH)\lib\include" /I"$(GENN_PATH)\userproject\include" /I"$(CUDA_PATH)\include" !IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITEW6432)" == "AMD64" -LINK_FLAGS ="$(GENN_PATH)\lib\lib\genn.lib" "$(CUDA_PATH)\lib\x64\cudart.lib" "$(CUDA_PATH)\lib\x64\cuda.lib" +LINK_FLAGS =$(LINK_FLAGS) "$(GENN_PATH)\lib\lib\genn.lib" "$(CUDA_PATH)\lib\x64\cudart.lib" "$(CUDA_PATH)\lib\x64\cuda.lib" !ELSE -LINK_FLAGS ="$(GENN_PATH)\lib\lib\genn.lib" "$(CUDA_PATH)\lib\Win32\cudart.lib" "$(CUDA_PATH)\lib\Win32\cuda.lib" +LINK_FLAGS =$(LINK_FLAGS) "$(GENN_PATH)\lib\lib\genn.lib" "$(CUDA_PATH)\lib\Win32\cudart.lib" "$(CUDA_PATH)\lib\Win32\cuda.lib" !ENDIF !ELSE -INCLUDE_FLAGS =/I"$(GENN_PATH)\lib\include" /I"$(GENN_PATH)\userproject\include" -LINK_FLAGS ="$(GENN_PATH)\lib\lib\genn_CPU_ONLY.lib" +INCLUDE_FLAGS =$(INCLUDE_FLAGS) /I"$(GENN_PATH)\lib\include" /I"$(GENN_PATH)\userproject\include" +LINK_FLAGS =$(LINK_FLAGS) "$(GENN_PATH)\lib\lib\genn_CPU_ONLY.lib" !ENDIF # An auto-generated file containing your cuda device's compute capability From e43f50ce957f952b1387e27d255558bc0322d953 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 18 Nov 2016 16:52:00 +0000 Subject: [PATCH 4/4] Updated release notes for GeNN release 2.2.2. --- doxygen/09_ReleaseNotes.dox | 28 ++++++++++++++++++++++++++++ doxygen/genn-doxygen.conf | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/doxygen/09_ReleaseNotes.dox b/doxygen/09_ReleaseNotes.dox index 9053c7360a..543d31303f 100644 --- a/doxygen/09_ReleaseNotes.dox +++ b/doxygen/09_ReleaseNotes.dox @@ -1,5 +1,33 @@ /*! \page ReleaseNotes Release Notes +Release Notes for GeNN v2.2.2 +==== + +This release includes minor new features and several bug fixes for certain system configurations. + +User Side Changes +---- + +1. Added support for the new version (2.0) of the Brian simulation package for Python. + +2. Added a mechanism for setting user-defined flags for the C++ compiler and NVCC compiler, via `GENN_PREFERENCES`. + +Bug fixes: +---- + +1. Fixed a problem with `atomicAdd()` redefinitions on certain CUDA runtime versions and GPU configurations. + +2. Fixed an incorrect bracket placement bug in code generation for certain models. + +3. Fixed an incorrect neuron group indexing bug in the learning kernel, for certain models. + +4. The dry-run compile phase now stores temporary files in the current directory, rather than the temp directory, solving issues on some systems. + +5. The `LINK_FLAGS` and `INCLUDE_FLAGS` in the common windows makefile include 'makefile_commin_win.mk' are now appended to, rather than being overwritten, fixing issues with custom user makefiles on Windows. + +------------------------------------------------------------------- + + Release Notes for GeNN v2.2.1 ==== diff --git a/doxygen/genn-doxygen.conf b/doxygen/genn-doxygen.conf index 75c259f940..fe6c8275c6 100755 --- a/doxygen/genn-doxygen.conf +++ b/doxygen/genn-doxygen.conf @@ -38,7 +38,7 @@ PROJECT_NAME = GeNN # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2.2 +PROJECT_NUMBER = 2.2.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a