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

Test script "test_weight_prepack.py" has errors. PR to resolve them. #231

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

abhilash1910
Copy link

@abhilash1910 abhilash1910 commented May 31, 2022

The script at "test_weight_prepack.py" has some errors as follows:

  • ipex.optimize has no attribute as 'sample_input' :
    ipex.optimize(origin_model1, dtype=dtype, optimizer=origin_optimizer1, level='O1', sample_input=x)
  • Issues with 3d torch tensor for NWC format as "is_channels_last" method does not assert to True for 3d tensor. The method seems correct as strides[w]=dim[c] ; however for some test cases, the channel last check fails. A check is placed to ensure that "is_channels_last" is True before asserting:
    if self._is_channels_last_nwc(y_ipex): self.assertTrue(self._is_channels_last_nwc(y_ipex))
    A sample test result for the NWC format is attached as a screenshot
    image

In this case strides[w]!=dim[c] for NWC although it should have been (hence assertTrue fails).

@EikanWang

@EikanWang
Copy link
Contributor

@abhilash1910 , the sample_input is used to query the optimal memory layout for performance. And IPEX has exposed this API. @zhuhaozhe , could you please check the root cause?

@EikanWang
Copy link
Contributor

@XiaobingSuper, have you encountered this issue?

@abhilash1910
Copy link
Author

@EikanWang Thanks for the information. I used the setup.py to install the dependencies and then ran the test script.

tenzen-y pushed a commit to tenzen-y/intel-extension-for-pytorch that referenced this pull request Sep 17, 2022
…el#231)

* The default release build optimization level of gcc is O3. IPEX explicitly appends the O2 to the CXX flags which results in optimization level conflict. This patch explicitly changes the default release build optimization level to O2.

* Add abi flags to the c++ extension library

* Refine code style
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.

None yet

2 participants