From cad4d1618fee74471d335314cb77070fee951a42 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Sun, 25 Feb 2018 13:29:44 +0000
Subject: [PATCH] Added support for Tensor Cores CC >= 7.0 (V100). For FP16/32 (mixed precision) define CUDNN_HALF should be used.

---
 src/utils.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/utils.c b/src/utils.c
index 05ad885..d6bdbf6 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -126,6 +126,7 @@
     {
         c = next+1;
     }
+	if(!next) while ((next = strchr(c, '\\'))) { c = next + 1; }
     c = copy_string(c);
     next = strchr(c, '.');
     if (next) *next = 0;
@@ -285,7 +286,8 @@
         fgets(&line[curr], readsize, fp);
         curr = strlen(line);
     }
-    if(line[curr-1] == '\n') line[curr-1] = '\0';
+    if(line[curr-2] == 0x0d) line[curr-2] = 0x00;
+    if(line[curr-1] == 0x0a) line[curr-1] = 0x00;
 
     return line;
 }

--
Gitblit v1.10.0