Skip to content

Commit

Permalink
Merge branch 'CLOC-0.9' of https://github.com/HSAFoundation/CLOC into…
Browse files Browse the repository at this point in the history
… CLOC-0.9

Simple fix to INSTALL.md instructions
  • Loading branch information
gregrodgers committed May 5, 2015
2 parents 7cdc94c + b2f3878 commit a63f932
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
18 changes: 13 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,20 @@ As of Cloc version 0.9 the cl frontend clc2 and supporting LLVM 3.6 executables
```
cd ~/git
git clone -b CLOC-0.9 https://github.com/HSAfoundation/CLOC.git
mkdir -p /opt/amd/cloc/bin/
sudo cp -rp CLOC/bin/ /opt/amd/cloc/bin/
cd
cp -r git/CLOC/examples .
cd examples/snack/helloworld
# Install
mkdir -p /opt/amd/cloc
sudo cp -rp ~/git/CLOC/bin /opt/amd/cloc
sudo cp -rp ~/git/CLOC/examples /opt/amd/cloc
sudo ln -sf /opt/amd/cloc/bin/cloc.sh /usr/local/bin/cloc.sh
sudo ln -sf /opt/amd/cloc/bin/snack.sh /usr/local/bin/snack.sh
sudo ln -sf /opt/amd/cloc/bin/printhsail /usr/local/bin/printhsail
# Test
cp -r /opt/amd/cloc/examples ~
cd ~/examples/snack/helloworld
./buildrun.sh
cd ~/examples/hsa/vector_copy
make
make test
```

## Set HSA environment variables
Expand Down
32 changes: 17 additions & 15 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
```
Note- If HSAIL-HLC-Stable is used. The tests have to be compiled with CFLAGS=-DDUMMY_ARGS=1. Example make all -DDUMMY_ARGS=1. Make sure to have the compiler and cloc installed in /opt/amd/cloc/bin and the runtime in opt/hsa/ as per the instructions in INSTALL.md
Make sure to have the compiler and cloc.sh installed in /opt/amd/cloc/bin and
the HSA runtime in /opt/hsa as per the instructions in INSTALL.md.
# Make a copy of the examples in your home directory
cp -r /opt/amd/cloc/examples ~/examples
#For building HSA examples.
cd hsa
make all
cd ~/examples/hsa/vector_copy
make
make test
#For building OKRA examples
export OKRA_DISABLE_FIX_HSAIL=1
cd okra
make all
cd ~/examples/hsa/vector_copy_async
make
make test
#For SNACK examples
cd snack/csquares
cd ~/examples/snack/csquares
./buildrun.sh
cd snack/fortran
cd ~/examples/snack/fortran
./buildrun.sh
cd snack/helloworld
cd ~/examples/snack/helloworld
./buildrun.sh
./buildrun.sh f
./buildrun.sh cpp
cd snack/matmul
cd ~/examples/snack/matmul
./buildrun.sh
cd ~/examples/snack/multiple_cl_files
./buildrun.sh
cd snack/multiple_cl_files
cd ~/examples/snack/vector_copy
./buildrun.sh
cd snack/vector_copy
cd ~/examples/snack/async_vecsum
./buildrun.sh
```
You can also build and run individually each test case

----------

Expand Down
2 changes: 1 addition & 1 deletion examples/hsa/vector_copy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(TEST_NAME): $(OBJ_FILES) $(COMMON_OBJ_FILES)
$(CC) $(LFLAGS) $(OBJ_FILES) -L$(HSA_RUNTIME_PATH)/lib -lhsa-runtime64 -o $(TEST_NAME)

$(TEST_NAME).brig :
cloc $(TEST_NAME).cl
cloc.sh $(TEST_NAME).cl

obj/%.o: %.c
$(CC) -c $(CFLAGS) $(INCS) -o $@ $< -std=c99
Expand Down
2 changes: 1 addition & 1 deletion examples/hsa/vector_copy_async/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(TEST_NAME): $(OBJ_FILES) $(COMMON_OBJ_FILES)
$(CC) $(LFLAGS) $(OBJ_FILES) -L$(HSA_RUNTIME_PATH)/lib -lhsa-runtime64 -o $(TEST_NAME)

$(TEST_NAME).brig :
cloc $(TEST_NAME).cl
cloc.sh $(TEST_NAME).cl

obj/%.o: %.c
$(CC) -c $(CFLAGS) $(INCS) -o $@ $< -std=c99
Expand Down

0 comments on commit a63f932

Please sign in to comment.