Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try using ROCFFT_ROOT before trying ROCM_ROOT. #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions bin/hipfc
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,19 @@ else
fi
LINKOPTS="$LINKOPTS -L$ROCM_DIR/hipblas/lib -lhipblas"
fi
if [ $ROCFFT ] ; then
if [ ! -d $ROCM_DIR/rocfft/lib ] ; then
echo "ERROR: Directory $ROCM_DIR/rocfft/lib does not exist"
echo " Please install rocfft"
exit $DEADRC
fi
LINKOPTS="$LINKOPTS -L$ROCM_DIR/rocfft/lib -lrocfft"

# If ROCFFT_ROOT is defined, then use it; otherwise try ROCM_DIR/rocfft.
if [ -v ROCFFT_ROOT ]; then
LINKOPTS="$LINKOPTS -L$ROCFFT_ROOT/lib -lrocfft"
else
if [ $ROCFFT ] ; then
if [ ! -d $ROCM_DIR/rocfft/lib ] ; then
echo "ERROR: Directory $ROCM_DIR/rocfft/lib does not exist"
echo " Please install rocfft"
exit $DEADRC
fi
LINKOPTS="$LINKOPTS -L$ROCM_DIR/rocfft/lib -lrocfft"
fi
fi
fi

Expand Down
6 changes: 3 additions & 3 deletions test/rocfft/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

HIPFORT_HOME ?= /tmp/hipfort
include $(HIPFORT_HOME)/bin/Makefile.hipfort
HIPFORT_ROOT ?= /tmp/hipfort
include $(HIPFORT_ROOT)/bin/Makefile.hipfort

OUTPUT_DIR ?= $(PWD)
LINKOPTS += -L$(ROCM)/rocfft/lib -l rocfft
LINKOPTS += -L$(ROCFFT_ROOT)/lib -l rocfft

APP = $(OUTPUT_DIR)/rocfft

Expand Down