Skip to content

Commit 07ecf04

Browse files
Update how to run sample for matrix_multiply_advisor (#2423)
Signed-off-by: Ang, Yee Teng <[email protected]>
1 parent 17e7788 commit 07ecf04

File tree

1 file changed

+57
-23
lines changed
  • Tools/Advisor/matrix_multiply_advisor

1 file changed

+57
-23
lines changed

Tools/Advisor/matrix_multiply_advisor/README.md

Lines changed: 57 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,45 +70,79 @@ Edit the line in `src/multiply.hpp` to select the version of the multiply functi
7070
`#define MULTIPLY multiply1`.
7171

7272

73-
### On a Linux* System
74-
To build the SYCL version:
75-
cd <sample dir>
76-
cmake .
77-
make
78-
79-
Clean the program
73+
### On Linux*
74+
1. Change to the sample directory.
75+
2. Build the program.
76+
```
77+
mkdir build
78+
cd build
79+
cmake ..
80+
make
81+
```
82+
3. Run the program:
83+
```
84+
./matrix_multiply
85+
```
86+
4. Clean the program using:
87+
```
8088
make clean
89+
```
8190

82-
If an error occurs, you can get more details by running `make` with
83-
the `VERBOSE=1` argument:
84-
``make VERBOSE=1``
91+
If an error occurs, you can get more details by running `make` with `VERBOSE=1`:
92+
```
93+
make VERBOSE=1
94+
```
8595
For more comprehensive troubleshooting, use the Diagnostics Utility for
8696
Intel® oneAPI Toolkits, which provides system checks to find missing
8797
dependencies and permissions errors.
8898
[Learn more](https://www.intel.com/content/www/us/en/develop/documentation/diagnostic-utility-user-guide/top.html).
8999

90-
### On a Windows* System Using Visual Studio 2017 or newer
91-
* Open Visual Studio 2017
92-
* Select Menu "File > Open > Project/Solution", find "matrix_multiply" folder and select "matrix_multiply.sln"
93-
* Select Menu "Project > Build" to build the selected configuration
94-
* Select Menu "Debug > Start Without Debugging" to run the program
95100

96-
### on Windows - command line - Build the program using MSBuild
97-
DPCPP Configurations:
98-
Release - MSBuild matrix_multiply.sln /t:Rebuild /p:Configuration="Release"
99-
Debug - MSBuild matrix_multiply.sln /t:Rebuild /p:Configuration="Debug"
101+
### On Windows*
102+
**Using Visual Studio***
103+
104+
Build the program using **Visual Studio 2017** or newer.
105+
1. Change to the sample directory.
106+
2. Right-click on the solution file and open the solution in the IDE.
107+
2. Right-click on the project in **Solution Explorer** and select **Rebuild**.
108+
109+
**Using MSBuild**
100110

111+
1. Open "x64 Native Tools Command Prompt for VS2017" or "x64 Native Tools Command Prompt for VS2019" or whatever is appropriate for your Visual Studio* version.
101112

113+
2. Change to the sample directory.
114+
115+
3. Run the following command:
116+
```
117+
MSBuild matrix_multiply.sln /t:Rebuild /p:Configuration="Release"
118+
```
119+
120+
or
121+
122+
```
123+
MSBuild matrix_multiply.sln /t:Rebuild /p:Configuration="Debug"
124+
```
125+
4. Navigate to the Release/Debug folder (example: x64/Release)
126+
5. Run the program:
127+
```
128+
matrix_multiply.exe
129+
```
102130

103131
### Example of Output
104132
```
105-
./matrix.dpcpp
106-
133+
Address of buf1 = 0000020CBE24B040
134+
Offset of buf1 = 0000020CBE24B180
135+
Address of buf2 = 0000020CBEA5E040
136+
Offset of buf2 = 0000020CBEA5E1C0
137+
Address of buf3 = 0000020CBF26C040
138+
Offset of buf3 = 0000020CBF26C100
139+
Address of buf4 = 0000020CBFA71040
140+
Offset of buf4 = 0000020CBFA71140
107141
Using multiply kernel: multiply1
108142
109-
Running on Intel(R) Gen9
143+
Running on Intel(R) Iris(R) Xe Graphics
110144
111-
Elapsed Time: 0.539631s
145+
Elapsed Time: 0.978114s
112146
```
113147

114148
## Running an Intel® Advisor analysis

0 commit comments

Comments
 (0)