Skip to content

Commit

Permalink
update cuDLA samples
Browse files Browse the repository at this point in the history
fix missing DPRINTF
fix Makefile
  • Loading branch information
Ru7w1k committed Nov 23, 2021
1 parent e64c65a commit 3a05f29
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Samples/cuDLAErrorReporting/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -346,6 +346,8 @@ endif

ALL_CCFLAGS += --std=c++11 --threads 0

LIBRARIES += -lcudla

ifeq ($(SAMPLE_ENABLED),0)
EXEC ?= @echo "[@]"
endif
Expand Down
1 change: 1 addition & 0 deletions Samples/cuDLAErrorReporting/NsightEclipse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<keyword>CPP11</keyword>
</keywords>
<libraries>
<library>cudla</library>
</libraries>
<librarypaths>
</librarypaths>
Expand Down
2 changes: 2 additions & 0 deletions Samples/cuDLAErrorReporting/main.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include <fstream>
#include <sstream>

#define DPRINTF(...) printf(__VA_ARGS__)

static void printTensorDesc(cudlaModuleTensorDescriptor* tensorDesc) {
DPRINTF("\tTENSOR NAME : %s\n", tensorDesc->name);
DPRINTF("\tsize: %lu\n", tensorDesc->size);
Expand Down
4 changes: 3 additions & 1 deletion Samples/cuDLAHybridMode/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -346,6 +346,8 @@ endif

ALL_CCFLAGS += --std=c++11 --threads 0

LIBRARIES += -lcudla

ifeq ($(SAMPLE_ENABLED),0)
EXEC ?= @echo "[@]"
endif
Expand Down
1 change: 1 addition & 0 deletions Samples/cuDLAHybridMode/NsightEclipse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<keyword>CPP11</keyword>
</keywords>
<libraries>
<library>cudla</library>
</libraries>
<librarypaths>
</librarypaths>
Expand Down
4 changes: 2 additions & 2 deletions Samples/cuDLAStandaloneMode/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -349,7 +349,7 @@ endif

ALL_CCFLAGS += --std=c++11 --threads 0

LIBRARIES += -lnvscibuf -lnvscisync
LIBRARIES += -lcudla -lnvscibuf -lnvscisync

ifeq ($(SAMPLE_ENABLED),0)
EXEC ?= @echo "[@]"
Expand Down
1 change: 1 addition & 0 deletions Samples/cuDLAStandaloneMode/NsightEclipse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<keyword>CPP11</keyword>
</keywords>
<libraries>
<library>cudla</library>
<library>nvscibuf</library>
<library>nvscisync</library>
</libraries>
Expand Down
2 changes: 2 additions & 0 deletions Samples/cuDLAStandaloneMode/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include <sstream>
#include <unistd.h>

#define DPRINTF(...) printf(__VA_ARGS__)

static void printTensorDesc(cudlaModuleTensorDescriptor* tensorDesc) {
DPRINTF("\tTENSOR NAME : %s\n", tensorDesc->name);
DPRINTF("\tsize: %lu\n", tensorDesc->size);
Expand Down

0 comments on commit 3a05f29

Please sign in to comment.