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

Improve handling of floating-point parameters #29

Open
psyhtest opened this issue Jun 30, 2020 · 0 comments
Open

Improve handling of floating-point parameters #29

psyhtest opened this issue Jun 30, 2020 · 0 comments
Labels

Comments

@psyhtest
Copy link
Contributor

Floating-point parameters (like a scalar scaling factor) were more or less an afterthought in CK-NNTest. Therefore, this area is still rather buggy.

For example, with two GEMM parameters alpha=1.0 and beta=0.0, the following fails:

$ ck run program:gemm-pytorch --dataset_file=shape-1024-1024-1024-1.0-0
...
CK error: [program] problem opening json file=/homes/anton/CK/ck-nntest/dataset/tensor-gemm-0001/shape-1024-1024-1024-1.json ([Errno 2] No such file or directory: '/homes/anton/CK/ck-nntest/dataset/tensor-gemm-0001/shape-1024-1024-1024-1.json')!

while two equivalent representations work fine:

$ ck run program:gemm-pytorch --dataset_file=shape-1024-1024-1024-1.0-0.0
...
  (checking output correctness ...)
     * Searching directory with reference output "default-f4407088898d5f10-1.0-0.0-1024-1024-1024-1-42" ...
     * Reference output found - validating ...
     * File: /disk1/homes/anton/CK/local/program.output/program-uid-6ac244466493cbcd/default-f4407088898d5f10-1.0-0.0-1024-1024-1024-1-42
       Validated successfully!

$ ck run program:gemm-pytorch --dataset_file=shape-1024-1024-1024-1-0
...
  (checking output correctness ...)
     * Searching directory with reference output "default-f4407088898d5f10-1.0-0.0-1024-1024-1024-1-42" ...
     * Reference output found - validating ...
     * File: /disk1/homes/anton/CK/local/program.output/program-uid-6ac244466493cbcd/default-f4407088898d5f10-1.0-0.0-1024-1024-1024-1-42
       Validated successfully!

The dataset files are completely identical:

$ cd `ck find dataset:tensor-gemm-0001`
$ md5sum shape-1024-1024-1024*.json
90a74c27b382bbd97e390a8e1d37de3b  shape-1024-1024-1024-1.0-0.0.json
90a74c27b382bbd97e390a8e1d37de3b  shape-1024-1024-1024-1.0-0.json
90a74c27b382bbd97e390a8e1d37de3b  shape-1024-1024-1024-1-0.json
$ cat shape-1024-1024-1024-1-0.json 
{
  "CK_GEMM_ALPHA": 1.0, 
  "CK_GEMM_BETA": 0.0, 
  "CK_GEMM_K": 1024, 
  "CK_GEMM_M": 1024, 
  "CK_GEMM_N": 1024
}
@psyhtest psyhtest added the bug label Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant