Skip to content

Conversation

cmc-rep
Copy link
Contributor

@cmc-rep cmc-rep commented Aug 28, 2020

histogram using SLM and 256 bins

yanfeng3721 and others added 2 commits August 28, 2020 16:40
Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: yanfeng xiao <[email protected]>

Co-authored-by: Aleksander Fadeev <[email protected]>
@cmc-rep cmc-rep requested a review from a team as a code owner August 28, 2020 23:44
@cmc-rep cmc-rep requested a review from alexbatashev August 28, 2020 23:44
Copy link
Contributor

@alexbatashev alexbatashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix CI errors

@@ -0,0 +1,221 @@
//==---------------- matrix_transpose.cpp - DPC++ ESIMD on-device test ----==//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header is wrong.

Comment on lines +20 to +23
#define NUM_BINS 256
#define SLM_SIZE (NUM_BINS * 4)
#define BLOCK_WIDTH 32
#define NUM_BLOCKS 32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about some C++?

Suggested change
#define NUM_BINS 256
#define SLM_SIZE (NUM_BINS * 4)
#define BLOCK_WIDTH 32
#define NUM_BLOCKS 32
static constexpr int NUM_BINS = 256;
static constexpr int SLM_SIZE = NUM_BINS * 4;
static constexpr int BLOCK_WIDTH = 32;
static constexpr int NUM_BLOCKS = 32;

return 1;
}

class ESIMDSelector : public device_selector {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about refactoring this class into a separate file or even put it along with other standard selectors to be available to users?

<< dev_type << "' is not.\n";
return -1;
}
// If "SYCL_DEVICE_TYPE" not defined, only allow gpu device
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why so? If host device is supported, why not let select it automatically?


HistogramCPU(input_size, input_ptr, cpu_histogram);

printf("finish cpu_histogram\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++?

Suggested change
printf("finish cpu_histogram\n");
std::cout << "finish cpu_histogram\n";

}
};

int main(int argc, char *argv[]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't use them anyway.

Suggested change
int main(int argc, char *argv[]) {
int main() {

@cmc-rep cmc-rep closed this Aug 31, 2020
@cmc-rep cmc-rep deleted the cmc-rep-change branch August 31, 2020 15:15
jsji pushed a commit that referenced this pull request Mar 7, 2024
Chenyang-L pushed a commit that referenced this pull request Feb 18, 2025
[Doc] fix typo in LEVEL_ZERO.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants